New to KendoReactLearn about KendoReact Free.

ComboBoxProps

Represents the props of the KendoReact ComboBox component.

NameTypeDefaultDescription

accessKey?

string

Specifies the accessKey of the ComboBox.

jsx
<ComboBox accessKey="k" />

adaptive?

boolean

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

jsx
<ComboBox adaptive={true} />

adaptiveFilter?

string

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

jsx
<ComboBox adaptiveFilter="Option" />

adaptiveTitle?

string

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

jsx
<ComboBox adaptiveTitle="Adaptive Popup Title" />

allowCustom?

boolean

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

jsx
<ComboBox 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
<ComboBox ariaDescribedBy="descriptionId" />

ariaLabel?

string

The accessible label of the component.

jsx
<ComboBox ariaLabel="ComboBox Label" />

ariaLabelledBy?

string

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

jsx
<ComboBox ariaLabelledBy="labelId" />

className?

string

Sets additional classes to the ComboBox.

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

clearButton?

boolean

If clearButton is set to true, the ComboBox renders a button on hovering over the component. Clicking this button resets the value of the ComboBox to undefined and triggers the change event.

jsx
<ComboBox clearButton={true} />

data?

any[]

Sets the data of the ComboBox (more information and examples).

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

dataItemKey?

string

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

jsx
<ComboBox dataItemKey="id" />

defaultValue?

any

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

jsx
<ComboBox defaultValue="Option2" />

dir?

string

Represents the dir HTML attribute.

jsx
<ComboBox dir="rtl" />

disabled?

boolean

Sets the disabled state of the ComboBox.

jsx
<ComboBox disabled={true} />

fillMode?

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

solid

Configures the fillMode of the ComboBox.

The available options are:

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

filter?

"null" | string

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

jsx
<ComboBox filter="Option" />

filterable?

boolean

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

jsx
<ComboBox filterable={true} />

focusedItemIndex?

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

If set, the ComboBox 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));
};

<ComboBox focusedItemIndex={focusedItemIndex} />

React.ReactNode

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

jsx
<ComboBox footer={<div>Footer Content</div>} />

groupField?

string

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

jsx
<ComboBox groupField="category" />

groupHeaderItemRender?

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

Fires when a ComboBox group header item is about to be rendered. Used to override the default appearance of the group's headers when the component is configured in modern group mode.

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

groupMode?

string

Defines the classic or modern type of the grouping's visualization. Defaults to modern.

jsx
<ComboBox groupMode="classic" />

groupStickyHeaderItemRender?

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

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

jsx
<ComboBox groupStickyHeaderItemRender={(div, stickyHeaderProps) => <div>{stickyHeaderProps.group}</div>} />

React.ReactNode

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

jsx
<ComboBox header={<div>Header Content</div>} />

iconClassName?

string

Sets CSS classes to the expand icon DOM element.

jsx
<ComboBox iconClassName="custom-icon-class" />

id?

string

Specifies the id of the component.

jsx
<ComboBox id="comboBoxId" />

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
<ComboBox inputAttributes={{ maxLength: 10 }} />

itemRender?

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

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

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

label?

string

Renders a floating label for the ComboBox.

jsx
<ComboBox 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. Used to override the default appearance of the element.

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

loading?

boolean

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

jsx
<ComboBox loading={true} />

name?

string

Specifies the name property of the input DOM element.

This property is part of the FormComponentProps interface.

onBlur?

(event: ComboBoxBlurEvent) => void

Fires each time the ComboBox gets blurred.

jsx
<ComboBox onBlur={(event) => console.log('ComboBox blurred', event)} />

onChange?

(event: ComboBoxChangeEvent) => void

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

jsx
<ComboBox onChange={(event) => console.log('Value changed', event)} />

onClose?

(event: ComboBoxCloseEvent) => void

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

jsx
<ComboBox onClose={(event) => console.log('Popup closed', event)} />

onFilterChange?

(event: ComboBoxFilterChangeEvent) => void

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

jsx
<ComboBox onFilterChange={(event) => console.log('Filter changed', event)} />

onFocus?

(event: ComboBoxFocusEvent) => void

Fires each time the user focuses the ComboBox.

jsx
<ComboBox onFocus={(event) => console.log('ComboBox focused', event)} />

onOpen?

(event: ComboBoxOpenEvent) => void

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

jsx
<ComboBox onOpen={(event) => console.log('Popup opened', event)} />

onPageChange?

(event: ComboBoxPageChangeEvent) => void

Fires when both the virtual scrolling of the ComboBox is enabled and the component requires data for another page (more information and examples).

jsx
<ComboBox onPageChange={(event) => console.log('Page changed', event)} />

opened?

boolean

Sets the opened and closed state of the ComboBox.

jsx
<ComboBox opened={true} />

placeholder?

string

The hint that is displayed when the ComboBox is empty.

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

popupSettings?

DropDownsPopupSettings

Configures the popup of the ComboBox.

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

prefix?

CustomComponent<any>

Sets a custom prefix to the ComboBox component.

jsx
<ComboBox 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 ComboBox.

The available options are:

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

size?

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

medium

Configures the size of the ComboBox.

The available options are:

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

skipDisabledItems?

boolean

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

jsx
<ComboBox skipDisabledItems={false} />

style?

React.CSSProperties

The styles that are applied to the ComboBox.

jsx
<ComboBox style={{ width: '250px' }} />

suffix?

CustomComponent<any>

Sets a custom suffix to the ComboBox component.

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

suggest?

boolean

Enables the auto-completion of the text based on the first data item (see example).

jsx
<ComboBox suggest={true} />

svgIcon?

SVGIcon

Sets the specified SVG icon.

jsx
<ComboBox svgIcon={{ name: 'custom-icon' }} />

tabIndex?

number

Specifies the tabIndex of the ComboBox.

jsx
<ComboBox tabIndex={0} />

textField?

string

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

jsx
<ComboBox textField="name" />

title?

string

Sets the title attribute to the underlying input element of the ComboBox.

jsx
<ComboBox title="ComboBox Title" />

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 ComboBox (more information and examples).

jsx
<ComboBox value="Option1" />

valueRender?

(rendering: ReactElement<HTMLSpanElement>) => ReactNode

Fires when the ComboBox input element is about to be rendered. Use it to override the default appearance of the component.

jsx
<ComboBox valueRender={(rendering) => <span>{rendering}</span>} />

virtual?

VirtualizationSettings

Configures the virtual scrolling of the ComboBox (more information and examples).

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