Field select
React component for selecting a single field from metadata. The list is virtualized, i.e. it only renders the fields that are visible, for performance reasons.
Install
Add the component to your project. Note that this is a private package so you will need
an .npmrc
file that grants you access.
Import the component:
Use
Properties
name | type | required | default |
---|---|---|---|
value | string | false | |
options | Record<string, Definition> | true | |
size | small | default | false | default |
disabled | boolean | false | false |
mods | string | false | |
onChange | (option?: FieldSelectOption | null) => void | true | |
isDisabledFn | (field:Definition) => ({ isDisabled:boolean, disableReason?: string }) | false |
Examples
Small
With missing field selected
Disabled Select
Disabled fields
To make certain fields unavailable for selection add the isDisabledFn
property: