0.6.2 • Published 7 years ago

react-property-grid v0.6.2

Weekly downloads
9
License
MIT
Repository
github
Last release
7 years ago

react-property-grid

React/redux implementation of a hierarchical, editable property grid, backed by JSON Schema.

Heavily inspired by Treema, this React component takes a JSON Schema and optional default JSON data to dynamically build a powerful and performant hierarchical grid with editable values.

This project is a WIP: some important features are not there yet, but hopefully they will soon!

screenshot

Installation

npm install --save react-property-grid

Usage

import React from 'react'
import ReactDOM from 'react-dom'
import PropertyGrid from 'react-property-grid'

ReactDOM.render(
  <PropertyGrid schema={schema} />,
  document.getElementById('property-grid')
)

Options

NameDescriptionDefault
schemaA valid JSON Schema{"$schema": "http://json-schema.org/draft-04/schema#", "properties": {"hello": {"type": "string"}}}
dataOptional default JSON data{"hello": "world"}
titleOptional header title string"Properties"
onChangeOptional callback executed when data changesfunction(data) { console.log(data) }

To do

  • Fields validation
  • Selection from anyOf list when adding an item (now it's auto-selecting the first one)
  • 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
  5. Submit a pull request :D

Credits

Thanks to Irion for financing this project and contributing to it!

License

The MIT License (MIT)

0.6.2

7 years ago

0.6.1

7 years ago

0.6.0

7 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago