AutoSaveOptions
Options for the auto save module.
Properties
autoSaveHandler()?
optionalautoSaveHandler: (instance) =>any
A handler for the auto save operation. You need to provide this or saveUrl if you set autoSave:true.
Parameters
instance
Returns
any
debounceTimeout?
optionaldebounceTimeout:number
A debounce timeout to use when the autoSave functionality is turned on. You can use this to reduce the number of calls to your auto save endpoint.
enabled?
optionalenabled:boolean
Whether or not to automatically save the data when an update to a model object occurs. If you set this then you need to provide saveUrl or autoSaveHandler.
onAfterAutoSave()?
optionalonAfterAutoSave: () =>any
A function to run after the auto save has run.
Returns
any
onAutoSaveError()?
optionalonAutoSaveError: () =>any
A function to call when an auto save operation experienced an error.
Returns
any
onAutoSaveSuccess()?
optionalonAutoSaveSuccess: () =>any
A function to call when an auto save operation was successful.
Returns
any
onBeforeAutoSave()?
optionalonBeforeAutoSave: () =>any
A function to run before auto save runs.
Returns
any
saveHeaders?
optionalsaveHeaders:any
A map of HTTP headers to send along with an auto save request.
saveUrl?
optionalsaveUrl:string
URL for auto save endpoint.
type?
optionaltype:string
Optional type to use for auto save. Defaults to "json", the default input/output format VisuallyJs uses. If you have registered your own exporter you can use this parameter to instruct VisuallyJs to auto save via that exporter.