Components
    • Animation
    • Barcodes
    • Buttons
    • Charts
    • Common Utilities
    • Conversational UI
    • Data Grid
    • Data Query
    • Data Tools
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdowns
    • Editor
    • Excel Export
    • File Saver
    • Form
    • Gantt
    • Gauges
    • Indicators
    • Inputs
    • Labels
    • Layout
    • ListBox
    • ListView
    • Mapbeta
    • Notification
    • PDF Processing
    • PivotGrid
    • Popup
    • Progress Bars
    • Ripple
    • Scheduler
    • ScrollView
    • Sortable
    • TaskBoard
    • Tooltips
    • TreeList
    • TreeView
    • Upload
    Sample Applications
    Styling & Themes
    Common Features
    Project Setup
    Changelog

DropDownListProps

Represents the props of the KendoReact DropDownList component.

NameTypeDefaultDescription

accessKey?

string

Specifies the accessKey of the DropDownList.

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.

ariaLabel?

string

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

ariaLabelledBy?

string

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

className?

string

Sets additional classes to the DropDownList.

data?

any[]

Sets the data of the DropDownList (see example).

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

defaultItem?

any

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

defaultValue?

any

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

delay?

number

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

dir?

string

Represents the dir HTML attribute.

disabled?

boolean

Sets the disabled state of the DropDownList.

fillMode?

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

solid

Configures the fillMode of the DropDownList.

The available options are:

  • solid
  • flat
  • outline
  • nullDoes not set a fillMode className.

filter?

string

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

filterable?

boolean

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

React.ReactNode

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

header?

React.ReactNode

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

iconClassName?

string

Sets CSS classes to the expand icon DOM element.

id?

string

Specifies the id of the component.

ignoreCase?

boolean

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

label?

string

Renders a floating label for the DropDownList.

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.

loading?

boolean

Sets the loading state of the DropDownList.

name?

string

Specifies the name property of the select DOM element.

opened?

boolean

Sets the opened and closed state of the DropDownList.

popupSettings?

DropDownsPopupSettings

Configures the popup of the DropDownList.

required?

boolean

Specifies if null is a valid value for the component.

This property is part of the FormComponentProps interface.

rounded?

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

medium

Configures the roundness of the DropDownList.

The available options are:

  • small
  • medium
  • large
  • full
  • nullDoes not set a rounded className.

size?

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

medium

Configures the size of the DropDownList.

The available options are:

  • small
  • medium
  • large
  • nullDoes not set a size className.

style?

React.CSSProperties

The styles that are applied to the DropDownList.

tabIndex?

number

Specifies the tabIndex of the DropDownList.

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.

title?

string

Sets the title attribute to the DropDownList DOM element.

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.

virtual?

VirtualizationSettings

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

Methods

focusedItemIndex

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.

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

<DropDownList focusedItemIndex={focusedItemIndex} />
Parameters

data

any

inputText

string

textField?

string

Returns

number

itemRender

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

Parameters

li

ReactElement<HTMLLIElement>

itemProps

ListItemProps

Returns

ReactNode

listNoDataRender

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.

Parameters

element

ReactElement<HTMLDivElement>

Returns

ReactNode

onBlur

Fires each time the DropDownList gets blurred.

Parameters

event

DropDownListBlurEvent

onChange

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

Parameters

event

DropDownListChangeEvent

onClose

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

Parameters

event

DropDownListCloseEvent

onFilterChange

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

Parameters

event

DropDownListFilterChangeEvent

onFocus

Fires each time the user focuses the DropDownList.

Parameters

event

DropDownListFocusEvent

onOpen

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

Parameters

event

DropDownListOpenEvent

onPageChange

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

Parameters

event

DropDownListPageChangeEvent

valueMap

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

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'));
Parameters

value

any

Returns

any

valueRender

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

Parameters

element

ReactElement<HTMLSpanElement>

value

any

Returns

ReactNode