1.4.0 • Published 8 years ago

react-property-editor v1.4.0

Weekly downloads
4,045
License
-
Repository
github
Last release
8 years ago

React property editor

It is based on react-json and offers some predefined editors.

Demo & Examples

Live demo

To build the examples locally, run:

npm install
gulp dev

Then open localhost:8000 in a browser.

Installation

The easiest way to use this component is to install it from NPM and include it in your own React build process (using Browserify, Webpack, etc).

You can also use the standalone build by including dist/react-pathjs-chart.js in your page. If you use this, make sure you have already included React, and it is available as a global variable.

npm install react-pathjs-chart --save

Usage

import PropertyEditor from 'react-property-editor';

var App = React.createClass({
    getInitialState(){
        return {
            value: {
                name: "amigo",
                color: '',
                html: '',
                code: '',
                chart: {
                    showLines: true,
                    axisX: {
                        showLines: true
                    },
                },
                array: [1, 2, 3]
            }
        }
    },
    logChange(value){
        console.log(value);
        this.setState({value:value});
        console.log(this.state.value);

    },
    render() {
        return (<div>
            <PropertyEditor value={ this.state.value }  onChange={ this.logChange } />
        </div>)
    }
});

Properties

  • value - value object - map the structure of your property grid to your object.
  • onChange(value) - when any property is changed the changed value object is passed as parameter

Notes

License

MIT. Copyright (c) 2015 Roman Samec

1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.2.5

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.19

9 years ago

0.1.18

9 years ago

0.1.17

9 years ago

0.1.16

9 years ago

0.1.14

9 years ago

0.1.13

9 years ago

0.1.12

9 years ago

0.1.11

9 years ago

0.1.10

9 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago