3.0.0 • Published 10 years ago
data-form v3.0.0
#data-form
Generate a form from the row of a dataset and it's JSONSchema-style properties.
Install
npm i --save editdata/data-formAPI
createDataForm(h, options)
createDataForm
Create a form from the row of a dataset and its properties
Parameters
hFunction DOM hyperscript functionoptionsObjectoptions.rowArray The row to be editedoptions.propertiesObject The row properties/column namesoptions.headerBooleanoptions.headerObject virtual-dom vtree that should be used for the headeroptions.onclickFunction Event handler that fires when a field is clickedoptions.oninputFunction Event handler that fires when a field is receiving input. Receives the argumentsevent,rowKey,propertyKey,inputValueoptions.onupdateFunction Event handler that fires whenever some data has changed.options.ondestroyFunction Event handler that fires when user clicks thedestroy rowbutton.options.oncloseFunction Event handler that fires when user clicks theclosebutton.