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

nametyperequireddefault
valuestringfalse
optionsRecord<string, Definition>true
sizesmall | defaultfalsedefault
disabledbooleanfalsefalse
modsstringfalse
onChange(option?: FieldSelectOption | null) => voidtrue
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:

Search Gunnel

Powered byAlgolia