Skip to main content
AutoSaveOptions
Options for the auto save module.
NameTypeDescription
autoSaveHandler?(instance:VisuallyJsModel) => anyA handler for the auto save operation. You need to provide this or saveUrl if you set autoSave:true.
debounceTimeout?numberA 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?booleanWhether 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?() => anyA function to run after the auto save has run.
onAutoSaveError?() => anyA function to call when an auto save operation experienced an error.
onAutoSaveSuccess?() => anyA function to call when an auto save operation was successful.
onBeforeAutoSave?() => anyA function to run before auto save runs.
saveHeaders?anyA map of HTTP headers to send along with an auto save request.
saveUrl?stringURL for auto save endpoint.
type?stringOptional 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.