Created
March 4, 2016 21:24
-
-
Save ASteinheiser/e4d206857942d51fc06b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import JsonSchemaForm from 'react-jsonschema-form' | |
import NodeNumberInput from '../components/node-number-input' | |
import NodeSchemaInput from '../components/node-schema-input' | |
import FlowDataInput from '../components/flow-data-input' | |
export default class FlowJsonSchemaEditor extends Component { | |
state = { | |
nodeNumber: null, | |
nodeSchema: {}, | |
flowData: {}, | |
nodeData: {} | |
} | |
handleSchemaChange = ({ formData, edit, errors }) => { | |
console.log(formData, edit, errors) | |
} | |
render() { | |
const { nodeSchema, nodeData } = this.state | |
return <div> | |
<NodeNumberInput/> | |
<NodeSchemaInput/> | |
<FlowDataInput/> | |
<h1>Schema Output</h1> | |
<JsonSchemaForm | |
schema={nodeSchema} | |
formData={nodeData} | |
onChange={this.handleSchemaChange}/> | |
</div> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment