react-json-editor
react-json-editor copied to clipboard
inputComponents not rendering for nested properties
As seen on https://github.com/bananafunctor/react-json-editor/commit/487ca3d333eb035ce3abfa4204939173e872525f specifically the test for nested inputComponents, they will fail to render right now.
Relevant code below
it('should render nested inputComponent', () => {
const TestComponent = React.createClass({
render() {
return <p className="test">Hello, world!</p>;
}
});
const handlers = {
testComponent : TestComponent
};
const nestedSchema = {
"properties": {
"Test": {
"x-hints": {
"form": {
"inputComponent": "testComponent"
}
}
}
}
};
const renderedForm = TestUtils.renderIntoDocument(<Form schema={nestedSchema}
handlers={handlers}/>);
const paragraph = TestUtils.findRenderedDOMComponentWithClass(renderedForm, "test");
expect(TestUtils.isCompositeComponentWithType(paragraph, TestComponent));
})