Interface: RsDropdownProps
Props for the RsDropdown component.
Extends
InputPickerProps.LoadDataProps
Properties
appearance?
optionalappearance:PickerAppearance
A picker can have different appearances.
Inherited from
InputPickerProps.appearance
as?
optionalas:ElementType<any, keyof IntrinsicElements>
You can use a custom element for this component
Inherited from
InputPickerProps.as
block?
optionalblock:boolean
Format picker to appear inside a content block
Inherited from
InputPickerProps.block
cacheData?
optionalcacheData:InputItemDataType<any>[]
Option to cache value when searching asynchronously
Inherited from
InputPickerProps.cacheData
caretAs?
optionalcaretAs:ElementType<any, keyof IntrinsicElements>
Custom caret component
Inherited from
InputPickerProps.caretAs
children?
optionalchildren:ReactNode
Primary content
Inherited from
InputPickerProps.children
childrenKey?
optionalchildrenKey:string
The key to use for setting the children in the data.
Default
children
Inherited from
InputPickerProps.childrenKey
className?
optionalclassName:string
Additional classes
Inherited from
InputPickerProps.className
classPrefix?
optionalclassPrefix:string
The prefix of the component CSS class
Inherited from
InputPickerProps.classPrefix
cleanable?
optionalcleanable:boolean
A picker that can clear values
Inherited from
InputPickerProps.cleanable
container?
optionalcontainer:HTMLElement| () =>HTMLElement
Sets the rendering container
Inherited from
InputPickerProps.container
containerPadding?
optionalcontainerPadding:number
Set the padding of the container.
Inherited from
InputPickerProps.containerPadding
creatable?
optionalcreatable:boolean
Settings can create new options
Inherited from
InputPickerProps.creatable
data
data:
InputItemDataType<string|number>[]
The data of the component.
Inherited from
InputPickerProps.data
defaultOpen?
optionaldefaultOpen:boolean
Initial open menu
Inherited from
InputPickerProps.defaultOpen
defaultValue?
optionaldefaultValue:any
Initial value
Inherited from
InputPickerProps.defaultValue
disabled?
optionaldisabled:boolean
A picker can show it is currently unable to be interacted with
Inherited from
InputPickerProps.disabled
disabledItemValues?
optionaldisabledItemValues:any
Disabled items
Inherited from
InputPickerProps.disabledItemValues
disableVirtualized?
optionaldisableVirtualized:boolean
Flag, if true, the virtualized will be disabled, false otherwise.
Inherited from
LoadDataProps.disableVirtualized
groupBy?
optionalgroupBy:string
Set group condition key in data
Inherited from
InputPickerProps.groupBy
htmlSize?
optionalhtmlSize:number
The htmlSize attribute defines the width of the «input> element.
id?
optionalid:string
Inherited from
InputPickerProps.id
label
label:
string
The label for the dropdown.
labelKey?
optionallabelKey:string
The key to use for displaying the options in the data.
Default
label
Inherited from
InputPickerProps.labelKey
listProps?
optionallistProps:Partial<ListProps<any>>
Virtualized List Props
Inherited from
InputPickerProps.listProps
loading?
optionalloading:boolean
Whether to display an loading indicator on toggle button
Inherited from
InputPickerProps.loading
locale?
optionallocale:Partial<InputPickerLocale>
Custom locale
Inherited from
InputPickerProps.locale
menuAutoWidth?
optionalmenuAutoWidth:boolean
Picker menu auto width
Inherited from
InputPickerProps.menuAutoWidth
menuClassName?
optionalmenuClassName:string
A CSS class to apply to the Menu DOM node.
Inherited from
InputPickerProps.menuClassName
menuMaxHeight?
optionalmenuMaxHeight:number
Picker menu max Height
Inherited from
InputPickerProps.menuMaxHeight
menuStyle?
optionalmenuStyle:CSSProperties
A style to apply to the Menu DOM node.
Inherited from
InputPickerProps.menuStyle
name?
optionalname:string
Name of the form field
Inherited from
InputPickerProps.name
onBlur?
optionalonBlur:FocusEventHandler<Element>
The onBlur attribute for the input element.
Inherited from
InputPickerProps.onBlur
onChange()?
optionalonChange: (value) =>void
Called after the value has been changed.
Parameters
value
any
the value.
Returns
void
Overrides
InputPickerProps.onChange
onClean()?
optionalonClean: (event) =>void
Called when clean
Parameters
event
SyntheticEvent
Returns
void
Inherited from
InputPickerProps.onClean
onClose()?
optionalonClose: () =>void
Called when Modal is closed
Returns
void
Inherited from
InputPickerProps.onClose
onCreate()?
optionalonCreate: (value,item,event) =>void
Called when the option is created
Parameters
value
any
item
ItemDataType
event
SyntheticEvent
Returns
void
Inherited from
InputPickerProps.onCreate
onEnter()?
optionalonEnter: (node) =>void
Callback fired before the Modal transitions in
Parameters
node
HTMLElement
Returns
void
Inherited from
InputPickerProps.onEnter
onEntered()?
optionalonEntered: (node) =>void
Callback fired after the Modal finishes transitioning in
Parameters
node
HTMLElement
Returns
void
Inherited from
InputPickerProps.onEntered
onEntering()?
optionalonEntering: (node) =>void
Callback fired as the Modal begins to transition in
Parameters
node
HTMLElement
Returns
void
Inherited from
InputPickerProps.onEntering
onExit()?
optionalonExit: (node) =>void
Callback fired right before the Modal transitions out
Parameters
node
HTMLElement
Returns
void
Inherited from
InputPickerProps.onExit
onExited()?
optionalonExited: (node) =>void
Callback fired after the Modal finishes transitioning out
Parameters
node
HTMLElement
Returns
void
Inherited from
InputPickerProps.onExited
onExiting()?
optionalonExiting: (node) =>void
Callback fired as the Modal begins to transition out
Parameters
node
HTMLElement
Returns
void
Inherited from
InputPickerProps.onExiting
onFocus?
optionalonFocus:FocusEventHandler<Element>
The onFocus attribute for the input element.
Inherited from
InputPickerProps.onFocus
onGroupTitleClick()?
optionalonGroupTitleClick: (event) =>void
Called after clicking the group title
Parameters
event
SyntheticEvent
Returns
void
Inherited from
InputPickerProps.onGroupTitleClick
onLoadData?
optionalonLoadData:LoadDataHandler
The callback function called when data should be load.
Inherited from
LoadDataProps.onLoadData
onOpen()?
optionalonOpen: () =>void
Called when Modal is displayed
Returns
void
Inherited from
InputPickerProps.onOpen
onSearch()?
optionalonSearch: (searchKeyword,event?) =>void
Called when searching
Parameters
searchKeyword
string
event?
SyntheticEvent<Element, Event>
Returns
void
Inherited from
InputPickerProps.onSearch
onSelect()?
optionalonSelect: (value,item,event) =>void
Called when the option is selected
Parameters
value
any
item
ItemDataType<any>
event
SyntheticEvent
Returns
void
Inherited from
InputPickerProps.onSelect
open?
optionalopen:boolean
Open the menu and control it
Inherited from
InputPickerProps.open
placeholder?
optionalplaceholder:ReactNode
Placeholder text
Inherited from
InputPickerProps.placeholder
placement?
optionalplacement:Placement
The placement of picker
Inherited from
InputPickerProps.placement
plaintext?
optionalplaintext:boolean
Render the control as plain text
Inherited from
InputPickerProps.plaintext
preload?
optionalpreload:boolean
Flag, if true, the data will be loaded in advance, before opening the dropdown, false otherwise.
Inherited from
LoadDataProps.preload
preventOverflow?
optionalpreventOverflow:boolean
Prevent floating element overflow
Inherited from
InputPickerProps.preventOverflow
readOnly?
optionalreadOnly:boolean
Make the control readonly
Inherited from
InputPickerProps.readOnly
renderExtraFooter()?
optionalrenderExtraFooter: () =>ReactNode
Custom render extra footer
Returns
ReactNode
Inherited from
InputPickerProps.renderExtraFooter
renderMenu()?
optionalrenderMenu: (menu) =>ReactNode
Customizing the Rendering Menu list
Parameters
menu
ReactNode
Returns
ReactNode
Inherited from
InputPickerProps.renderMenu
renderMenuGroup()?
optionalrenderMenuGroup: (title,item) =>ReactNode
Custom render menu group
Parameters
title
ReactNode
item
ItemDataType
Returns
ReactNode
Inherited from
InputPickerProps.renderMenuGroup
renderMenuItem()?
optionalrenderMenuItem: (label,item) =>ReactNode
Custom render menuItems
Parameters
label
ReactNode
item
ItemDataType
Returns
ReactNode
Inherited from
InputPickerProps.renderMenuItem
renderValue()?
optionalrenderValue: (value,item,selectedElement) =>ReactNode
Parameters
value
any
item
ItemDataType<any>
selectedElement
ReactNode
Returns
ReactNode
Inherited from
InputPickerProps.renderValue
searchable?
optionalsearchable:boolean
Whether dispaly search input box
Inherited from
InputPickerProps.searchable
searchBy()?
optionalsearchBy: (keyword,label,item) =>boolean
Custom search rules.
Parameters
keyword
string
label
ReactNode
item
ItemDataType
Returns
boolean
Inherited from
InputPickerProps.searchBy
shouldDisplayCreateOption()?
optionalshouldDisplayCreateOption: (searchKeyword,filteredData) =>boolean
Customize whether to display "Create option" action with given textbox value
By default, InputPicker hides "Create option" action when textbox value matches any filtered item's [valueKey] property
Parameters
searchKeyword
string
Value of the textbox
filteredData
InputItemDataType<any>[]
The items filtered by the searchKeyword
Returns
boolean
Inherited from
InputPickerProps.shouldDisplayCreateOption
size?
optionalsize:Size
A picker can have different sizes
Inherited from
InputPickerProps.size
sort()?
optionalsort: (isGroup) => (a,b) =>number
Sort options
Parameters
isGroup
boolean
Returns
(
a,b):number
Parameters
a
any
b
any
Returns
number
Inherited from
InputPickerProps.sort
style?
optionalstyle:CSSProperties
Additional style
Inherited from
InputPickerProps.style
tabIndex?
optionaltabIndex:number
Inherited from
InputPickerProps.tabIndex
toggleAs?
optionaltoggleAs:ElementType<any, keyof IntrinsicElements>
You can use a custom element for this component
Inherited from
InputPickerProps.toggleAs
value?
optionalvalue:any
Current value of the component. Creates a controlled component
Inherited from
InputPickerProps.value
valueKey?
optionalvalueKey:string
The key to use for setting the option value in the data.
Default
value
Inherited from
InputPickerProps.valueKey
virtualized?
optionalvirtualized:boolean
Whether using virtualized list
Inherited from
InputPickerProps.virtualized