-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Self-explanatory dream API:
import Form from "react-jsonschema-form";
const MyComponent = (props) => {
// ....
};
const schema = {
type: "string"
};
const widgets = {
myComponent: MyComponent
};
const uiSchema = {
"ui:widget": "myComponent"
};
render((<Form
schema={schema}
uiSchema={uiSchema}
widgets={widgets}
/>), document.querySelector("main"))Context: as uiSchema should be defined using JSON (and no necessarily JavaScript), we need to expose a way to register a custom component and associate it with a string unique identifier we can later reference from the JSON definition.
/cc @leplatrem
Natimalmet
Metadata
Metadata
Assignees
Labels
No labels