A react/redux implementation of hierarchical, editable property grid, backed by JSON Schema.
npm install react-property-grid
npm install --save react-property-grid
`
Usage
`javascript
import React from 'react'
import ReactDOM from 'react-dom'
import PropertyGrid from 'react-property-grid'
ReactDOM.render(
,
document.getElementById('property-grid')
)
`
$3
| Name | Description | Default |
|----------|-------------|---------|
| schema | A valid JSON Schema | {"$schema": "http://json-schema.org/draft-04/schema#", "properties": {"hello": {"type": "string"}}} |
| data | Optional default JSON data | {"hello": "world"} |
| title | Optional header title string | "Properties" |
| onChange | Optional callback executed when data changes | function(data) { console.log(data) } |
To do
- [ ] Fields validation
- [x] Selection from anyOf list when adding an item (now it's auto-selecting the first one)
- [x] allOf properties
- [ ] oneOf properties
- [ ] not properties
- [ ] object's minProperties and maxProperties
- [ ] array's uniqueItems
- [ ] schema- and property-dependencies
- [ ] patternProperties
- [ ] Circular $refs
- [ ] More useful description on caption row
- [ ] Custom field editors?
Contributing
1. Fork it!
2. Create your feature branch: git checkout -b my-new-feature
3. Commit your changes: git commit -am 'Add some feature'
4. Push to the branch: git push origin my-new-feature`