Skip to main content

PickerInput - Selector form input

Effect demonstration

1. Default effect

 const loadTypeData = [
{label: 'One', value: 1},
{label: 'Two', value: 2},
{label: 'Three', value: 3},
];
...
<PickerInput label="hahaha" data={loadTypeData} />
<WhiteSpace />
<PickerInput label="hahaha" labelPosition="left" data={loadTypeData} />

API

PropertiesRequiredDescriptionTypeDefault Value
datatrueSelection dataCascadePickerItemProps[] | Array<CascadePickerItemProps[]>[]
cascadefalseWhether to cascade selectionbooleanfalse
colsfalseSelect the number of columnsnumber3
valuefalseselected valueItemValue[]
onChangefalseSelection callback(value?: ItemValue[]) => void
titlefalseSelector titlestring
onClosefalsePop-up window closing event() => void
cancelTextfalseCancel button textstringCancel
okTextfalseConfirm button textstringOK
activeOpacityfalseOpacity when pressednumber0.6
labelfalselabel textReactNode
labelPositionfalseLabel text positiontop | lefttop
requiredfalseIs it requiredbooleanfalse
placeholderfalseDefault promptstringPlease select
allowClearfalseWhether to allow clearingbooleantrue
disabledfalseWhether to disablebooleanfalse
brieffalseExtrasReactNode
stylefalseCustom styleViewStyle