Grid Form

Component editable grid for form.

Props

The GridForm inherits the props Grid and extends the following props:

form Object

Props of an item edit form. See the component documentation Form.

default: {}
form: {
  inputs: {
    name:  { label: 'Name'  },
    price: {
      label: 'Price',
      component: 'masked',
      maskType: 'currency'
    }
  }
}

createButton Object

It proposed to create the new item. See the component documentation Button.

name String

Button Name create or key string location of the resource settings i18n and l10n.

default: "actions.add"
icon String

Icon name used on the button.

default: "add"

updateButton Object

It proposed to update the item. See the component documentation Button.

name String

Name button update or key string location of the resource settings i18n and l10n.

default: "actions.update"
icon String

Icon name used on the button.

default: "edit"

cancelButton Object

It proposed the changes cancel button. See the component documentation Button.

name String

Name button cancel or key string location of the resource settings i18n and l10n.

default: "actions.cancel"
icon String

Icon name used on the button.

default: "cancel"

onSubmit Function

Function callback executed when receiving event submit.

default: function(event, postData) {}
onSubmit: function(event, postData) {
  // logic for when data is submited.
}

onReset Function

Function callback executed when receiving event of reset.

default: function(event) {}
onReset: function(event) {
  // logic for when form is cleaned
}

onSuccess Function

Function callback runs to send data successfully.

default: function(data, status, xhr) {}

onError Function

Function callback runs in failing to send data.

default: function(xhr, status, error) {}