Interface: RsTagPickerProps
Props for the RsTagPicker component.
Extends
TagPickerProps
Properties
appearance?
optionalappearance:PickerAppearance
A picker can have different appearances.
Inherited from
TagPickerProps.appearance
as?
optionalas:ElementType<any, keyof IntrinsicElements>
You can use a custom element for this component
Inherited from
TagPickerProps.as
block?
optionalblock:boolean
Format picker to appear inside a content block
Inherited from
TagPickerProps.block
cacheData?
optionalcacheData:InputItemDataType<any>[]
Option to cache value when searching asynchronously
Inherited from
TagPickerProps.cacheData
caretAs?
optionalcaretAs:ElementType<any, keyof IntrinsicElements>
Custom caret component
Inherited from
TagPickerProps.caretAs
children?
optionalchildren:ReactNode
Primary content
Inherited from
TagPickerProps.children
childrenKey?
optionalchildrenKey:string
The key to use for setting the children in the data.
Default
children
Inherited from
TagPickerProps.childrenKey
className?
optionalclassName:string
Additional classes
Inherited from
TagPickerProps.className
classPrefix?
optionalclassPrefix:string
The prefix of the component CSS class
Inherited from
TagPickerProps.classPrefix
cleanable?
optionalcleanable:boolean
A picker that can clear values
Inherited from
TagPickerProps.cleanable
container?
optionalcontainer:HTMLElement| () =>HTMLElement
Sets the rendering container
Inherited from
TagPickerProps.container
containerPadding?
optionalcontainerPadding:number
Set the padding of the container.
Inherited from
TagPickerProps.containerPadding
creatable?
optionalcreatable:boolean
Settings can create new options
Inherited from
TagPickerProps.creatable
data
data:
InputItemDataType<string|number>[]
The data of the component.
Inherited from
TagPickerProps.data
defaultOpen?
optionaldefaultOpen:boolean
Initial open menu
Inherited from
TagPickerProps.defaultOpen
defaultValue?
optionaldefaultValue:any
Initial value
Inherited from
TagPickerProps.defaultValue
disabled?
optionaldisabled:boolean
A picker can show it is currently unable to be interacted with
Inherited from
TagPickerProps.disabled
disabledItemValues?
optionaldisabledItemValues:any
Disabled items
Inherited from
TagPickerProps.disabledItemValues
groupBy?
optionalgroupBy:string
Set group condition key in data
Inherited from
TagPickerProps.groupBy
id?
optionalid:string
Inherited from
TagPickerProps.id
label
label:
string
Label for the tag picker.
labelKey?
optionallabelKey:string
The key to use for displaying the options in the data.
Default
label
Inherited from
TagPickerProps.labelKey
listProps?
optionallistProps:Partial<ListProps<any>>
Virtualized List Props
Inherited from
TagPickerProps.listProps
loading?
optionalloading:boolean
Whether to display an loading indicator on toggle button
Inherited from
TagPickerProps.loading
locale?
optionallocale:Partial<InputPickerLocale>
Custom locale
Inherited from
TagPickerProps.locale
menuAutoWidth?
optionalmenuAutoWidth:boolean
Picker menu auto width
Inherited from
TagPickerProps.menuAutoWidth
menuClassName?
optionalmenuClassName:string
A CSS class to apply to the Menu DOM node.
Inherited from
TagPickerProps.menuClassName
menuMaxHeight?
optionalmenuMaxHeight:number
Picker menu max Height
Inherited from
TagPickerProps.menuMaxHeight
menuStyle?
optionalmenuStyle:CSSProperties
A style to apply to the Menu DOM node.
Inherited from
TagPickerProps.menuStyle
name?
optionalname:string
Name of the form field
Inherited from
TagPickerProps.name
onBlur?
optionalonBlur:FocusEventHandler<Element>
The onBlur attribute for the input element.
Inherited from
TagPickerProps.onBlur
onChange()?
optionalonChange: (value) =>void
Called after the value has been changed.
Parameters
value
any
the value.
Returns
void
Overrides
TagPickerProps.onChange
onClean()?
optionalonClean: (event) =>void
Called when clean
Parameters
event
SyntheticEvent
Returns
void
Inherited from
TagPickerProps.onClean
onClose()?
optionalonClose: () =>void
Called when Modal is closed
Returns
void
Inherited from
TagPickerProps.onClose
onCreate()?
optionalonCreate: (value,item,event) =>void
Called when the option is created
Parameters
value
any
item
ItemDataType
event
SyntheticEvent
Returns
void
Inherited from
TagPickerProps.onCreate
onEnter()?
optionalonEnter: (node) =>void
Callback fired before the Modal transitions in
Parameters
node
HTMLElement
Returns
void
Inherited from
TagPickerProps.onEnter
onEntered()?
optionalonEntered: (node) =>void
Callback fired after the Modal finishes transitioning in
Parameters
node
HTMLElement
Returns
void
Inherited from
TagPickerProps.onEntered
onEntering()?
optionalonEntering: (node) =>void
Callback fired as the Modal begins to transition in
Parameters
node
HTMLElement
Returns
void
Inherited from
TagPickerProps.onEntering
onExit()?
optionalonExit: (node) =>void
Callback fired right before the Modal transitions out
Parameters
node
HTMLElement
Returns
void
Inherited from
TagPickerProps.onExit
onExited()?
optionalonExited: (node) =>void
Callback fired after the Modal finishes transitioning out
Parameters
node
HTMLElement
Returns
void
Inherited from
TagPickerProps.onExited
onExiting()?
optionalonExiting: (node) =>void
Callback fired as the Modal begins to transition out
Parameters
node
HTMLElement
Returns
void
Inherited from
TagPickerProps.onExiting
onFocus?
optionalonFocus:FocusEventHandler<Element>
The onFocus attribute for the input element.
Inherited from
TagPickerProps.onFocus
onGroupTitleClick()?
optionalonGroupTitleClick: (event) =>void
Called after clicking the group title
Parameters
event
SyntheticEvent
Returns
void
Inherited from
TagPickerProps.onGroupTitleClick
onOpen()?
optionalonOpen: () =>void
Called when Modal is displayed
Returns
void
Inherited from
TagPickerProps.onOpen
onSearch()?
optionalonSearch: (searchKeyword,event?) =>void
Called when searching
Parameters
searchKeyword
string
event?
SyntheticEvent<Element, Event>
Returns
void
Inherited from
TagPickerProps.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
TagPickerProps.onSelect
onTagRemove()?
optionalonTagRemove: (tag,event) =>void
Callback fired when a tag is removed.
Parameters
tag
string
event
MouseEvent
Returns
void
Inherited from
TagPickerProps.onTagRemove
open?
optionalopen:boolean
Open the menu and control it
Inherited from
TagPickerProps.open
placeholder?
optionalplaceholder:ReactNode
Placeholder text
Inherited from
TagPickerProps.placeholder
placement?
optionalplacement:Placement
The placement of picker
Inherited from
TagPickerProps.placement
plaintext?
optionalplaintext:boolean
Render the control as plain text
Inherited from
TagPickerProps.plaintext
preventOverflow?
optionalpreventOverflow:boolean
Prevent floating element overflow
Inherited from
TagPickerProps.preventOverflow
readOnly?
optionalreadOnly:boolean
Make the control readonly
Inherited from
TagPickerProps.readOnly
renderExtraFooter()?
optionalrenderExtraFooter: () =>ReactNode
Custom render extra footer
Returns
ReactNode
Inherited from
TagPickerProps.renderExtraFooter
renderMenu()?
optionalrenderMenu: (menu) =>ReactNode
Customizing the Rendering Menu list
Parameters
menu
ReactNode
Returns
ReactNode
Inherited from
TagPickerProps.renderMenu
renderMenuGroup()?
optionalrenderMenuGroup: (title,item) =>ReactNode
Custom render menu group
Parameters
title
ReactNode
item
ItemDataType
Returns
ReactNode
Inherited from
TagPickerProps.renderMenuGroup
renderMenuItem()?
optionalrenderMenuItem: (label,item) =>ReactNode
Custom render menuItems
Parameters
label
ReactNode
item
ItemDataType
Returns
ReactNode
Inherited from
TagPickerProps.renderMenuItem
renderMenuItemCheckbox()?
optionalrenderMenuItemCheckbox: (checkboxProps) =>ReactNode
Custom render checkbox on menu item
Parameters
checkboxProps
CheckboxProps
Returns
ReactNode
Version
5.47.0
Inherited from
TagPickerProps.renderMenuItemCheckbox
renderValue()?
optionalrenderValue: (values,items,selectedElement) =>ReactNode
Custom render selected items
Parameters
values
any[]
items
ItemDataType<any>[]
selectedElement
ReactNode
Returns
ReactNode
Inherited from
TagPickerProps.renderValue
searchable?
optionalsearchable:boolean
Whether dispaly search input box
Inherited from
TagPickerProps.searchable
searchBy()?
optionalsearchBy: (keyword,label,item) =>boolean
Custom search rules.
Parameters
keyword
string
label
ReactNode
item
ItemDataType
Returns
boolean
Inherited from
TagPickerProps.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
TagPickerProps.shouldDisplayCreateOption
size?
optionalsize:Size
A picker can have different sizes
Inherited from
TagPickerProps.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
TagPickerProps.sort
style?
optionalstyle:CSSProperties
Additional style
Inherited from
TagPickerProps.style
tabIndex?
optionaltabIndex:number
Inherited from
TagPickerProps.tabIndex
tagProps?
optionaltagProps:TagProps
Tag related props.
Inherited from
TagPickerProps.tagProps
toggleAs?
optionaltoggleAs:ElementType<any, keyof IntrinsicElements>
You can use a custom element for this component
Inherited from
TagPickerProps.toggleAs
trigger?
optionaltrigger:TriggerType|TriggerType[]
Set the trigger for creating tags. only valid when creatable
Inherited from
TagPickerProps.trigger
value?
optionalvalue:any
Current value of the component. Creates a controlled component
Inherited from
TagPickerProps.value
valueKey?
optionalvalueKey:string
The key to use for setting the option value in the data.
Default
value
Inherited from
TagPickerProps.valueKey
virtualized?
optionalvirtualized:boolean
Whether using virtualized list
Inherited from
TagPickerProps.virtualized