ui:options types the options RJSF's widgets read
Detect
- Your custom widget reads an option named
accept,expandable,format,hideClearButton,hideNowButton,shape,starsoryearsRangewith a type of its own, such asui:format: { ... }. The type checker rejects the uiSchema value, and readingoptions.formatgives the type below.
UiSchema and UIOptionsType declare these options in both the ui:options and ui:<name> spellings:
| Option | Type |
|---|---|
accept | string |
expandable | boolean |
format | 'DMY' | 'MDY' | 'YMD' |
hideClearButton, hideNowButton | boolean |
shape | 'star' | 'heart' |
stars | number |
yearsRange | readonly [number, number] |
Change
Rename your option, in the uiSchema and in the widget that reads it:
- 'ui:options': { format: { currency: 'USD' } },
+ 'ui:options': { moneyFormat: { currency: 'USD' } },
Verify
- The uiSchema and the widget compile. Nothing changes at runtime.
- An unannotated uiSchema variable that sets
yearsRangeorshapemay also fail; see An unannotated uiSchema variable no longer fits the typed options. - A custom alt-date widget that passes
yearsRangeon may also fail; see A date element's range and yearsRange are readonly tuples.
Also read: