0.0.22 • Published 5 years ago

json-as-form v0.0.22

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

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

namerequireddefaultvaluedescription
jsonyes{}, [] plain JSON object or form state
onChangeyesfnget form state in callback based on json prop type
fixedKeysno[]enum "key", "value", non editable fields
autoAddRownofalseauto add new row
debugnofalseif true then It'll print state
rowInterpolatornorow=> rowinterpolate the row data beforeonChange callback

LICENSE

MIT @Firecamp

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago