0.0.22 • Published 6 years ago
json-as-form v0.0.22
Live Demo
https://codesandbox.io/s/json-as-form-demo-2si2l
Usage
import JSONForm from "json-as-form";
<JSONForm
json={plainJsonObjORArray}
onChange={data => console.log(data)}
autoAddRow={true}
debug={false}
rowInterpolator={row=> {
if(row.value) row.value = row.value.toLowerCase()
return row
}}
/>
Props
name | required | defaultvalue | description |
---|---|---|---|
json | yes | {}, [] plain JSON object or form state | |
onChange | yes | fn | get form state in callback based on json prop type |
fixedKeys | no | [] | enum "key", "value", non editable fields |
autoAddRow | no | false | auto add new row |
debug | no | false | if true then It'll print state |
rowInterpolator | no | row=> row | interpolate the row data beforeonChange callback |
LICENSE
MIT @Firecamp
0.0.22
6 years ago
0.0.21
6 years ago
0.0.20
6 years ago
0.0.19
6 years ago
0.0.18
6 years ago
0.0.17
6 years ago
0.0.16
6 years ago
0.0.15
6 years ago
0.0.14
6 years ago
0.0.13
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago