New to KendoReactLearn about KendoReact Free.

MultiSelectProps

Represents the props of the KendoReact MultiSelect component.

NameTypeDefaultDescription

accessKey?

string

Specifies the accessKey of the MultiSelect.

jsx
<MultiSelect accessKey="a" />

adaptive?

boolean

Providing different rendering of the popup element based on the screen dimensions.

jsx
<MultiSelect adaptive={true} />

adaptiveFilter?

string

Sets the value of the adaptive filtering input of the of MultiSelect.

jsx
<MultiSelect adaptiveFilter="Option" />

adaptiveTitle?

string

Specifies the text that is rendered as title in the adaptive popup.

jsx
<MultiSelect adaptiveTitle="Select an option" />

allowCustom?

boolean

Specifies whether the MultiSelect allows user-defined values that are not present in the dataset (see example). Defaults to false.

jsx
<MultiSelect allowCustom={true} />

ariaDescribedBy?

string

Identifies the element(s) which will describe the component, similar to HTML aria-describedby attribute. For example these elements could contain error or hint message.

jsx
<MultiSelect ariaDescribedBy="description" />

ariaLabel?

string

Specifies the accessible label of the interactive component.

jsx
<MultiSelect ariaLabel="MultiSelect" />

ariaLabelledBy?

string

Identifies the element(s) which will label the component.

jsx
<MultiSelect ariaLabelledBy="label" />

autoClose?

boolean

Determines whether to close the options list of the MultiSelect after the item selection is finished.

jsx
<MultiSelect autoClose={false} />

className?

string

Sets additional classes to the MultiSelect.

jsx
<MultiSelect className="custom-class" />

data?

any[]

Sets the data of the MultiSelect (see example).

jsx
<MultiSelect data={['Option1', 'Option2', 'Option3']} />

dataItemKey?

string

Sets the key for comparing the data items of the MultiSelect (see example). If dataItemKey is not set, the MultiSelect compares the items by reference.

jsx
<MultiSelect dataItemKey="id" />

defaultValue?

any[]

Sets the default value of the MultiSelect. Similar to the native select HTML element.

jsx
<MultiSelect defaultValue={['Option1']} />

dir?

string

Represents the dir HTML attribute.

jsx
<MultiSelect dir="rtl" />

disabled?

boolean

Sets the disabled state of the MultiSelect.

jsx
<MultiSelect disabled={true} />

fillMode?

"null" | "flat" | "solid" | "outline"

solid

Configures the fillMode of the MultiSelect.

The available options are:

  • solid
  • flat
  • outline
  • null—Does not set a fillMode className.
jsx
<MultiSelect fillMode="flat" />

filter?

string

Sets the value of filtering input. Useful for making the filtering input a controlled component.

jsx
<MultiSelect filter="Option" />

filterable?

boolean

Enables the filtering functionality of the MultiSelect (more information and examples).

jsx
<MultiSelect filterable={true} />

focusedItemIndex?

(data: any, inputText: string, textField?: string) => number

If set, the MultiSelect will use it to get the focused item index.

Default functionality returns the first item which starts with the input text.

jsx
const focusedItemIndex = (data, inputText, textField) => {
    let text = inputText.toLowerCase();
    return data.findIndex(item =>
        String(textField ? item[textField] : item).toLowerCase().includes(text));
};

<MultiSelect focusedItemIndex={focusedItemIndex} />

React.ReactNode

Sets the footer component of the MultiSelect (see example).

jsx
<MultiSelect footer={<div>Footer</div>} />

groupField?

string

Sets the data item field that represents the start of a group. Applicable to objects data.

jsx
<MultiSelect groupField="category" />

groupHeaderItemRender?

(li: ReactElement<HTMLLIElement>, itemProps: ListGroupItemProps) => ReactNode

Fires when a DropDownList's group header item is about to be rendered. Used to override the default appearance of the group's headers.

jsx
<MultiSelect groupHeaderItemRender={(li, itemProps) => <div>{itemProps.dataItem}</div>} />

groupStickyHeaderItemRender?

(div: ReactElement<HTMLDivElement>, stickyHeaderProps: GroupStickyHeaderProps) => ReactNode

Fires when a DropDownList's sticky group header item is about to be rendered. Used to override the default appearance of the sticky group header of the component.

jsx
<MultiSelect groupStickyHeaderItemRender={(div, stickyHeaderProps) => <div>{stickyHeaderProps.dataItem}</div>} />

React.ReactNode

Sets the header component of the MultiSelect (see example).

jsx
<MultiSelect header={<div>Header</div>} />

id?

string

Specifies the id of the component.

jsx
<MultiSelect id="multi-select" />

inputAttributes?

React.InputHTMLAttributes<HTMLInputElement>

Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.

jsx
<MultiSelect inputAttributes={{ maxLength: 10 }} />

itemRender?

(li: ReactElement<HTMLLIElement>, itemProps: ListItemProps) => ReactNode

Fires when a MultiSelect item is about to be rendered (see example). Used to override the default appearance of the list items.

jsx
<MultiSelect itemRender={(li, itemProps) => <div>{itemProps.dataItem}</div>} />

label?

string

Renders a floating label for the MultiSelect.

jsx
<MultiSelect label="Select an option" />

listNoDataRender?

(element: ReactElement<HTMLDivElement>) => ReactNode

Fires when the element which indicates no data in the popup is about to be rendered (see example). Used to override the default appearance of the element.

jsx
<MultiSelect listNoDataRender={(element) => <div>No data available</div>} />

loading?

boolean

Sets the loading state of the MultiSelect (see example).

jsx
<MultiSelect loading={true} />

name?

string

Specifies the name property of the input DOM element.

This property is part of the FormComponentProps interface.

onBlur?

(event: MultiSelectBlurEvent) => void

Fires each time the MultiSelect gets blurred.

jsx
<MultiSelect onBlur={(event) => console.log(event)} />

onCancel?

(event: MultiSelectCancelEvent) => void

Fires each time the popup of the MultiSelect is about to cancel in (adaptive mode).

jsx
<MultiSelect onCancel={(event) => console.log(event)} />

onChange?

(event: MultiSelectChangeEvent) => void

Fires each time the value of the MultiSelect is about to change (see examples).

jsx
<MultiSelect onChange={(event) => console.log(event)} />

onClose?

(event: MultiSelectCloseEvent) => void

Fires each time the popup of the MultiSelect is about to close.

jsx
<MultiSelect onClose={(event) => console.log(event)} />

onFilterChange?

(event: MultiSelectFilterChangeEvent) => void

Fires each time the user types in the filter input (see example). You can filter the source based on the passed filtration value.

jsx
<MultiSelect onFilterChange={(event) => console.log(event)} />

onFocus?

(event: MultiSelectFocusEvent) => void

Fires each time the user focuses the MultiSelect.

jsx
<MultiSelect onFocus={(event) => console.log(event)} />

onOpen?

(event: MultiSelectOpenEvent) => void

Fires each time the popup of the MultiSelect is about to open.

jsx
<MultiSelect onOpen={(event) => console.log(event)} />

onPageChange?

(event: MultiSelectPageChangeEvent) => void

Fires when both the virtual scrolling of the MultiSelect is enabled and when the component requires data for another page (see example).

jsx
<MultiSelect onPageChange={(event) => console.log(event)} />

opened?

boolean

Sets the opened and closed state of the MultiSelect.

jsx
<MultiSelect opened={true} />

placeholder?

string

The hint that is displayed when the MultiSelect is empty.

jsx
<MultiSelect placeholder="Select an option" />

popupSettings?

DropDownsPopupSettings

Configures the popup of the MultiSelect.

jsx
<MultiSelect popupSettings={{ animate: true }} />

prefix?

CustomComponent<any>

Sets a custom prefix to the MultiSelect component.

jsx
<MultiSelect prefix={<span>Prefix</span>} />

required?

boolean

Specifies if null is a valid value for the component.

This property is part of the FormComponentProps interface.

rounded?

"null" | "small" | "large" | "medium" | "full"

medium

Configures the roundness of the MultiSelect.

The available options are:

  • small
  • medium
  • large
  • full
  • null—Does not set a rounded className.
jsx
<MultiSelect rounded="large" />

size?

"null" | "small" | "large" | "medium"

medium

Configures the size of the MultiSelect.

The available options are:

  • small
  • medium
  • large
  • null—Does not set a size className.
jsx
<MultiSelect size="small" />

skipDisabledItems?

boolean

Defines if MultiSelect's disabled items will be skipped or focused when navigating through the list of items using a keyboard. Defaults to true.

jsx
<MultiSelect skipDisabledItems={false} />

style?

React.CSSProperties

The styles that are applied to the MultiSelect.

jsx
<MultiSelect style={{ width: '300px' }} />

suffix?

CustomComponent<any>

Sets a custom suffix to the MultiSelect component.

jsx
<MultiSelect suffix={<span>Suffix</span>} />

tabIndex?

number

Specifies the tabIndex of the MultiSelect.

jsx
<MultiSelect tabIndex={0} />

tagRender?

(tagData: TagData, tag: ReactElement<any>) => ReactElement<any>

Fires when a tag element is about to be rendered (see example). Used to override the default appearance of the element.

jsx
<MultiSelect tagRender={(tagData, tag) => <span>{tagData.text}</span>} />

tags?

TagData[]

Sets the tags of the MultiSelect (see example).

jsx
<MultiSelect tags={[{ text: 'Tag1' }, { text: 'Tag2' }]} />

textField?

string

Sets the data item field that represents the item text (see example). If the data contains only primitive values, do not define it.

jsx
<MultiSelect textField="name" />

valid?

boolean

Overrides the validity state of the component. If valid is set, the required property will be ignored.

This property is part of the FormComponentProps interface.

validationMessage?

string

Controls the form error message of the component. If set to an empty string, no error will be thrown.

This property is part of the FormComponentProps interface.

validityStyles?

boolean

If set to false, no visual representation of the invalid state of the component will be applied.

This property is part of the FormComponentProps interface.

value?

any[]

Sets the value of the MultiSelect (see example). It can either be of the primitive (string, numbers) or of the complex (objects) type.

jsx
<MultiSelect value={['Option1', 'Option2']} />

virtual?

VirtualizationSettings

Configures the virtual scrolling of the MultiSelect (see example).

jsx
<MultiSelect virtual={{ pageSize: 20 }} />
Not finding the help you need?
Contact Support