react-jsonschema-form
react-jsonschema-form copied to clipboard
access sibling data in uiSchema
Prerequisites
- [x] I have read the documentation;
- [ ] In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.
Description
I've got a select box and an auto-complete widget, I'd like to be able to filter what's in the autocomplete-widget based on the contents of the select box
const schema = {
type: 'object',
properties: {
type: {
type: 'string',
enum: ['ham', 'spam', 'eggs'],
},
fk: {
type: 'integer'
},
},
};
const uiSchema = {
{
'ui:widget': 'autocomplete',
'ui:options': { type: '$.type' }, // you could put the path to the formValue
}