AutoSaveOptions
Options for the auto save module.
| Name | Type | Description |
|---|---|---|
| autoSaveHandler? | (instance:VisuallyJsModel) => any | A handler for the auto save operation. You need to provide this or if you set . |
| debounceTimeout? | number | A debounce timeout to use when the functionality is turned on. You can use this to reduce the number of calls to your auto save endpoint. |
| enabled? | 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 or . |
| onAfterAutoSave? | () => any | A function to run after the auto save has run. |
| onAutoSaveError? | () => any | A function to call when an auto save operation experienced an error. |
| onAutoSaveSuccess? | () => any | A function to call when an auto save operation was successful. |
| onBeforeAutoSave? | () => any | A function to run before auto save runs. |
| saveHeaders? | any | A map of HTTP headers to send along with an auto save request. |
| saveUrl? | string | URL for auto save endpoint. |
| type? | 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. |