/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { FilterChangeEvent, ChangeEvent, OpenEvent, CloseEvent, FocusEvent, BlurEvent, PageChangeEvent } from './../common/events.js'; import { VirtualizationSettings, DropDownsPopupSettings } from '../common/settings.js'; import { ListGroupItemProps } from '../common/ListGroupItem.js'; import { GroupStickyHeaderProps } from '../common/GroupStickyHeader.js'; import { ListItemProps } from '../common/ListItem.js'; import { DropDownsClassStructure, FormComponentProps, SVGIcon } from '@progress/kendo-react-common'; import { DropDownListHandle } from './models/index.js'; /** * Represents the object of the `filterChange` DropDownList event. */ export interface DropDownListFilterChangeEvent extends FilterChangeEvent { } /** * Represents the object of the `change` DropDownList event. */ export interface DropDownListChangeEvent extends ChangeEvent { } /** * Represents the object of the `open` DropDownList event. */ export interface DropDownListOpenEvent extends OpenEvent { } /** * Represents the object of the `close` DropDownList event. */ export interface DropDownListCloseEvent extends CloseEvent { } /** * Represents the object of the `focus` DropDownList event. */ export interface DropDownListFocusEvent extends FocusEvent { } /** * Represents the object of the `blur` DropDownList event. */ export interface DropDownListBlurEvent extends BlurEvent { } /** * Represents the object of the `pageChange` DropDownList event. */ export interface DropDownListPageChangeEvent extends PageChangeEvent { } /** * Represents the props of the [KendoReact DropDownList component](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist). */ export interface DropDownListProps extends FormComponentProps { /** * Sets the data of the DropDownList ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/binding)). * * @example * ```jsx * * ``` */ data?: any[]; /** * Sets the text of the default empty item. The type of the defined value has to match the data type. * * @example * ```jsx * * ``` */ defaultItem?: any; /** * Sets the delay before an item search is performed. When filtration is disabled, use this option. * * @example * ```jsx * * ``` */ delay?: number; /** * Enables a case-insensitive search. When filtering is disabled, use this option. * * @example * ```jsx * * ``` */ ignoreCase?: boolean; /** * Sets the opened and closed state of the DropDownList. * * @example * ```jsx * * ``` */ opened?: boolean; /** * The styles that are applied to the DropDownList. * * @example * ```jsx * * ``` */ style?: React.CSSProperties; /** * Sets the value of the DropDownList ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/binding)). It can either be of the primitive (string, numbers) or of the complex (objects) type. * * @example * ```jsx * * ``` */ value?: any; /** * Sets the default value of the DropDownList ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/default-item)). Similar to the native `select` HTML element. * * @example * ```jsx * * ``` */ defaultValue?: any; /** * Sets additional classes to the DropDownList. * * @example * ```jsx * * ``` */ className?: string; /** * Sets CSS classes to the expand `icon` DOM element. * * @example * ```jsx * * ``` */ iconClassName?: string; /** * Sets the specified SVG icon. * * @example * ```jsx * * ``` */ svgIcon?: SVGIcon; /** * Sets the title attribute to the DropDownList DOM element. * * @example * ```jsx * * ``` */ title?: string; /** * Sets the disabled state of the DropDownList. * * @example * ```jsx * * ``` */ disabled?: boolean; /** * Represents the `dir` HTML attribute. * * @example * ```jsx * * ``` */ dir?: string; /** * Enables the filtering functionality of the DropDownList ([more information and examples](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/filtering)). * * @example * ```jsx * * ``` */ filterable?: boolean; /** * Sets the value of filtering input. Useful for making the filtering input a [controlled component](https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components). * * @example * ```jsx * * ``` */ filter?: string; /** * Sets the loading state of the DropDownList. * * @example * ```jsx * * ``` */ loading?: boolean; /** * Specifies the `tabIndex` of the DropDownList. * * @example * ```jsx * * ``` * * @remarks * This property is related to accessibility. */ tabIndex?: number; /** * Specifies the `accessKey` of the DropDownList. * * @example * ```jsx * * ``` * * @remarks * This property is related to accessibility. */ accessKey?: string; /** * Sets the data item field that represents the item text ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/default-item)). If the data contains only primitive values, do not define it. * * @example * ```jsx * * ``` */ textField?: 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](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/binding#toc-datasets-of-objects)). * * @example * ```jsx * * ``` */ dataItemKey?: string; /** * Represents a callback function, which returns the value for submitting. The returned value will be rendered in an `option` of a hidden [`select`](https://react.dev/reference/react-dom/components/select) element. * * @example * ```jsx * const App = () => { * return ( *
* value && value.id} * /> * * * ); * } * ``` */ valueMap?: (value: any) => any; /** * Renders a floating label for the DropDownList. * * @example * ```jsx * * ``` */ label?: string; /** * Specifies the id of the component. * * @example * ```jsx * * ``` */ id?: string; /** * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute). * For example these elements could contain error or hint message. * * @example * ```jsx * * ``` * * @remarks * This property is related to accessibility. */ ariaDescribedBy?: string; /** * Identifies the element(s) which will label the component. * * @example * ```jsx * * ``` * * @remarks * This property is related to accessibility. */ ariaLabelledBy?: string; /** * The accessible label of the component. By default is set to value of `label` prop. * * @example * ```jsx * * ``` * * @remarks * This property is related to accessibility. */ ariaLabel?: string; /** * Configures the popup of the DropDownList. * * @example * ```jsx * * ``` */ popupSettings?: DropDownsPopupSettings; /** * Configures the virtual scrolling of the DropDownList ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/virtualization)). * * @example * ```jsx * * ``` */ virtual?: VirtualizationSettings; /** * 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. * * @example * ```jsx * const focusedItemIndex = (data, inputText, textField) => { * let text = inputText.toLowerCase(); * return data.findIndex(item => * String(textField ? item[textField] : item).toLowerCase().includes(text)); * }; * * * ``` */ focusedItemIndex?: (data: any, inputText: string, textField?: string) => number; /** * Fires each time the popup of the DropDownList is about to open. * * @example * ```jsx * console.log('Popup opened')} /> * ``` */ onOpen?: (event: DropDownListOpenEvent) => void; /** * Fires each time the popup of the DropDownList is about to close. * * @example * ```jsx * console.log('Popup closed')} /> * ``` */ onClose?: (event: DropDownListCloseEvent) => void; /** * Fires each time the user focuses the DropDownList. * * @example * ```jsx * console.log('Focused')} /> * ``` */ onFocus?: (event: DropDownListFocusEvent) => void; /** * Fires each time the DropDownList gets blurred. * * @example * ```jsx * console.log('Blurred')} /> * ``` */ onBlur?: (event: DropDownListBlurEvent) => void; /** * Fires each time the value of the DropDownList is about to change ([see examples](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/binding)). * * @example * ```jsx * console.log('Value changed')} /> * ``` */ onChange?: (event: DropDownListChangeEvent) => void; /** * Fires each time the user types in the filter input. You can filter the source based on the passed filtration value. * * @example * ```jsx * console.log('Filter changed')} /> * ``` */ onFilterChange?: (event: DropDownListFilterChangeEvent) => void; /** * Fires when both the virtual scrolling of the DropDownList is enabled and the component requires data for another page ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/virtualization)). * * @example * ```jsx * console.log('Page changed')} /> * ``` */ onPageChange?: (event: DropDownListPageChangeEvent) => void; /** * Fires when a DropDownList item is about to be rendered ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/custom-rendering#toc-items)). Used to override the default appearance of the list items. * * @example * ```jsx *
  • {itemProps.dataItem}
  • } /> * ``` */ itemRender?: (li: React.ReactElement, itemProps: ListItemProps) => React.ReactNode; /** * Fires when the element which renders the value is about to be rendered ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/custom-rendering#toc-values)). Used to override the default appearance of the element. * * @example * ```jsx * {value}} /> * ``` */ valueRender?: (element: React.ReactElement, value: any) => React.ReactNode; /** * Fires when the element which indicates no data in the popup is about to be rendered ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/custom-rendering#toc-no-data)). Used to override the default appearance of the element. * * @example * ```jsx *
    No data available
    } /> * ``` */ listNoDataRender?: (element: React.ReactElement) => React.ReactNode; /** * Sets the header component of the DropDownList ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/custom-rendering#toc-headers-and-footers)). * * @example * ```jsx * Header Content} /> * ``` */ header?: React.ReactNode; /** * Sets the footer component of the DropDownList ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/custom-rendering#toc-headers-and-footers)). * * @example * ```jsx * Footer Content} /> * ``` */ footer?: React.ReactNode; /** * Specifies the `name` property of the `select` DOM element. * * @example * ```jsx * * ``` */ name?: string; /** * 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. * * @example * ```jsx * * ``` */ leftRightKeysNavigation?: boolean; /** * Configures the `size` of the DropDownList. * * The available options are: * - small * - medium * - large * * @default undefined (theme-controlled) * * @example * ```jsx * * ``` */ size?: 'small' | 'medium' | 'large'; /** * Configures the `roundness` of the DropDownList. * * The available options are: * - small * - medium * - large * - full * * @default undefined (theme-controlled) * * @example * ```jsx * * ``` */ rounded?: 'small' | 'medium' | 'large' | 'full' | 'none'; /** * Configures the `fillMode` of the DropDownList. * * The available options are: * - solid * - flat * - outline * * @default undefined (theme-controlled) * * @example * ```jsx * * ``` */ fillMode?: 'solid' | 'flat' | 'outline'; /** * Providing different rendering of the popup element based on the screen dimensions. * * @default `false` * * @example * ```jsx * * ``` */ adaptive?: boolean; /** * Specifies the text that is rendered as title in the adaptive popup(action sheet). * Applicable only when `adaptive` is set to `true`. * If not provided, the title will be the same as the label. * * @example * ```jsx * * ``` */ adaptiveTitle?: string; /** * Specifies the text that is rendered as subtitle in the adaptive popup(action sheet). * Applicable only when `adaptive` is set to `true`. * * @example * ```jsx * */ adaptiveSubtitle?: string; /** * Sets the data item field that represents the start of a group. Applicable to objects data. * * @example * ```jsx * * ``` */ groupField?: string; /** * Fires when a DropDownList's group header item is about to be rendered. Used to override the default appearance of the group's headers. * * @example * ```jsx *
  • {itemProps.dataItem}
  • } /> * ``` */ groupHeaderItemRender?: (li: React.ReactElement, itemProps: ListGroupItemProps) => React.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. * * @example * ```jsx *
    {stickyHeaderProps.dataItem}
    } /> * ``` */ groupStickyHeaderItemRender?: (div: React.ReactElement, stickyHeaderProps: GroupStickyHeaderProps) => React.ReactNode; /** * @hidden */ list?: any; /** * Defines if DropDownList's disabled items will be skipped or focused when navigating through the list of items using a keyboard. Defaults to `true`. * * @example * ```jsx * * ``` */ skipDisabledItems?: boolean; /** * @hidden */ unstyled?: DropDownsClassStructure; }