Skip to main content

SaveOptions

Options for a save via ajax.

Extends​

Properties​

data?​

optional data: any

optional data to save. If not provided we use the return value of exportData().


error()?​

optional error: (e, status?) => any

Optional callback to execute if there was an error saving the data.

Parameters​

e​

any

status?​

any

Returns​

any


headers?​

optional headers: Record<string, string>

Optional headers to set on the ajax request. By default, VisuallyJs will send a Content-Type:"application/json" header. If you provide your own headers this header will continue to be sent, unless of course you override it.


parameters?​

optional parameters: Record<string, any>

Optional parameters to pass to the exporter. If you write a custom exporter you may wish to use this.

Inherited from​

ExportOptions.parameters


success()?​

optional success: (r) => any

Optional callback to execute once the data has saved successfully.

Parameters​

r​

any

Returns​

any


type?​

optional type: string

Specifies the data type in which to format the data. Defaults to "json". This must match the name of an exporter registered with the given instance of VisuallyJs.

Inherited from​

ExportOptions.type


url​

url: string

URL to POST data to. Required.