data-form
Generate a form from the row of a dataset and it's JSONSchema-style properties.
Install
npm i --save editdata/data-form
API
createDataForm(h, options)
createDataForm
Create a form from the row of a dataset and its properties
Parameters
h
Function DOM hyperscript functionoptions
Objectoptions.row
Array The row to be editedoptions.properties
Object The row properties/column namesoptions.header
Booleanoptions.header
Object virtual-dom vtree that should be used for the headeroptions.onclick
Function Event handler that fires when a field is clickedoptions.oninput
Function Event handler that fires when a field is receiving input. Receives the argumentsevent
,rowKey
,propertyKey
,inputValue
options.onupdate
Function Event handler that fires whenever some data has changed.options.ondestroy
Function Event handler that fires when user clicks thedestroy row
button.options.onclose
Function Event handler that fires when user clicks theclose
button.