field().multiRestore()

Since: Editor 1.7

Restore the original values if edited to a single value.
Please note - this property requires the Editor extension for DataTables.

Description

Editor's multi-row editing UI provides an option to restore the original values if they are different for the rows selected (i18n.multi.restore - default "Undo changes"). This method provides access to that action programmatically.

This method will only perform any operations if the following conditions are true:

  • Multiple rows are being edited
  • The values for the field in question are original different between rows
  • An editing interface (UI or API) has been used to set the value of the field to be a single value.

Type

field(…).multiRestore()

Restore the original values of a field to the individual values from each row, if it has been edited to be a single value.

Returns:

DataTable.Editor.Field:
The field instance for chaining.

Related

The following options are directly related and may also be useful in your application development.