New to KendoReactLearn about KendoReact Free.

DropDownListProps

Represents the props of the KendoReact DropDownList component.

NameTypeDefaultDescription

accessKey?

string

Specifies the accessKey of the DropDownList.

jsx
<DropDownList accessKey="d" />

adaptive?

boolean

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

jsx
<DropDownList adaptive={true} />

adaptiveTitle?

string

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

jsx
<DropDownList adaptiveTitle="Adaptive Title" />

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
<DropDownList ariaDescribedBy="error-message-id" />

ariaLabel?

string

The accessible label of the component. By default is set to value of label prop.

jsx
<DropDownList ariaLabel="Accessible Label" />

ariaLabelledBy?

string

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

jsx
<DropDownList ariaLabelledBy="label-id" />

className?

string

Sets additional classes to the DropDownList.

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

data?

any[]

Sets the data of the DropDownList (see example).

jsx
<DropDownList data={['Item1', 'Item2', 'Item3']} />

dataItemKey?

string

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

jsx
<DropDownList dataItemKey="id" />

defaultItem?

any

Sets the text of the default empty item. The type of the defined value has to match the data type.

jsx
<DropDownList defaultItem="Select an item" />

defaultValue?

any

Sets the default value of the DropDownList (see example). Similar to the native select HTML element.

jsx
<DropDownList defaultValue="Item1" />

delay?

number

Sets the delay before an item search is performed. When filtration is disabled, use this option.

jsx
<DropDownList delay={300} />

dir?

string

Represents the dir HTML attribute.

jsx
<DropDownList dir="rtl" />

disabled?

boolean

Sets the disabled state of the DropDownList.

jsx
<DropDownList disabled={true} />

fillMode?

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

solid

Configures the fillMode of the DropDownList.

The available options are:

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

filter?

string

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

jsx
<DropDownList filter="search text" />

filterable?

boolean

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

jsx
<DropDownList filterable={true} />

focusedItemIndex?

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

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

<DropDownList focusedItemIndex={focusedItemIndex} />

React.ReactNode

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

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

groupField?

string

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

jsx
<DropDownList 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
<DropDownList groupHeaderItemRender={(li, itemProps) => <li>{itemProps.dataItem}</li>} />

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
<DropDownList groupStickyHeaderItemRender={(div, stickyHeaderProps) => <div>{stickyHeaderProps.dataItem}</div>} />

React.ReactNode

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

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

iconClassName?

string

Sets CSS classes to the expand icon DOM element.

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

id?

string

Specifies the id of the component.

jsx
<DropDownList id="dropdown-id" />

ignoreCase?

boolean

Enables a case-insensitive search. When filtering is disabled, use this option.

jsx
<DropDownList ignoreCase={true} />

itemRender?

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

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

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

label?

string

Renders a floating label for the DropDownList.

jsx
<DropDownList label="Dropdown Label" />

leftRightKeysNavigation?

boolean

If set to false, the DropDownList will not navigate over its data through left and right keys. Useful when the DropDownList is placed inside a toolbar which needs to handle left and right keys.

jsx
<DropDownList leftRightKeysNavigation={false} />

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
<DropDownList listNoDataRender={(element) => <div>No data available</div>} />

loading?

boolean

Sets the loading state of the DropDownList.

jsx
<DropDownList loading={true} />

name?

string

Specifies the name property of the select DOM element.

jsx
<DropDownList name="dropdown-name" />

onBlur?

(event: DropDownListBlurEvent) => void

Fires each time the DropDownList gets blurred.

jsx
<DropDownList onBlur={(event) => console.log('Blurred')} />

onChange?

(event: DropDownListChangeEvent) => void

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

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

onClose?

(event: DropDownListCloseEvent) => void

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

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

onFilterChange?

(event: DropDownListFilterChangeEvent) => void

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

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

onFocus?

(event: DropDownListFocusEvent) => void

Fires each time the user focuses the DropDownList.

jsx
<DropDownList onFocus={(event) => console.log('Focused')} />

onOpen?

(event: DropDownListOpenEvent) => void

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

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

onPageChange?

(event: DropDownListPageChangeEvent) => void

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

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

opened?

boolean

Sets the opened and closed state of the DropDownList.

jsx
<DropDownList opened={true} />

popupSettings?

DropDownsPopupSettings

Configures the popup of the DropDownList.

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

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 DropDownList.

The available options are:

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

size?

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

medium

Configures the size of the DropDownList.

The available options are:

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

skipDisabledItems?

boolean

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

jsx
<DropDownList skipDisabledItems={false} />

style?

React.CSSProperties

The styles that are applied to the DropDownList.

jsx
<DropDownList style={{ width: '200px' }} />

svgIcon?

SVGIcon

Sets the specified SVG icon.

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

tabIndex?

number

Specifies the tabIndex of the DropDownList.

jsx
<DropDownList tabIndex={0} />

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
<DropDownList textField="name" />

title?

string

Sets the title attribute to the DropDownList DOM element.

jsx
<DropDownList title="Dropdown 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 DropDownList (see example). It can either be of the primitive (string, numbers) or of the complex (objects) type.

jsx
<DropDownList value="Item1" />

valueMap?

(value: any) => any

Represents a callback function, which returns the value for submitting. The returned value will be rendered in an option of a hidden select element.

jsx
class App extends React.Component {
   render() {
      return (
         <form>
             <DropDownList
                 data={[ { text: "Austria", id: 1 } , { text: "Belarus", id: 2 } ]}
                 valueMap={value => value && value.id}
             />
             <button type="submit">Submit</button>
         </form>
      );
   }
}
ReactDOM.render(<App />, document.querySelector('my-app'));

valueRender?

(element: ReactElement<HTMLSpanElement>, value: any) => ReactNode

Fires when the element which renders the value is about to be rendered (see example). Used to override the default appearance of the element.

jsx
<DropDownList valueRender={(element, value) => <span>{value}</span>} />

virtual?

VirtualizationSettings

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

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