DevExtreme Vue - LocalStore Props

This section describes options that configure the LocalStore.

data

Specifies the store's associated array.

Type:

Array<any>

errorHandler

Specifies the function that is executed when the store throws an error.

Type:

Function

This function accepts a JavaScript Error object as the parameter.

flushInterval

Specifies a delay in milliseconds between when data changes and the moment these changes are saved in the local storage. Applies only if immediate is false.

Type:

Number

Default Value: 10000

immediate

Specifies whether the LocalStore saves changes in the local storage immediately.

Type:

Boolean

Default Value: false

See Also

key

Specifies the key property (or properties) used to access data items.

Type:

String

|

Array<String>

In the following example, the ProductID and ProductCode properties are specified as key properties:

name

Specifies the name under which data should be saved in the local storage. The dx-data-localStore- prefix will be added to the name.

Type:

String

onInserted

A function that is executed after a data item is added to the store.

Type:

Function

Function parameters:
values:

Object

The added data item.

key:

Object

|

String

|

Number

The item's key.

onInserting

A function that is executed before a data item is added to the store.

Type:

Function

Function parameters:
values:

Object

The data item to be added.

onLoaded

A function that is executed after data is loaded to the store.

Type:

Function

Function parameters:
result:

Array<any>

The loaded data.

onLoading

A function that is executed before data is loaded to the store.

Type:

Function

Function parameters:
loadOptions:

LoadOptions

Data processing settings.

onModified

A function that is executed after a data item is added, updated, or removed from the store.

Type:

Function

onModifying

A function that is executed before a data item is added, updated, or removed from the store.

Type:

Function

onRemoved

A function that is executed after a data item is removed from the store.

Type:

Function

Function parameters:
key:

Object

|

String

|

Number

The removed data item's key.

onRemoving

A function that is executed before a data item is removed from the store.

Type:

Function

Function parameters:
key:

Object

|

String

|

Number

The key of the data item to be removed.

onUpdated

A function that is executed after a data item is updated in the store.

Type:

Function

Function parameters:
key:

Object

|

String

|

Number

The updated data item's key.

values:

Object

Updated values.

onUpdating

A function that is executed before a data item is updated in the store.

Type:

Function

Function parameters:
key:

Object

|

String

|

Number

The key of the data item to be updated.

values:

Object

New values for the data item fields.