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

AutoCompleteProps

Represents the props of the KendoReact AutoComplete component.

NameTypeDefaultDescription

accessKey?

string

Specifies the accessKey of the AutoComplete.

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.

ariaLabelledBy?

string

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

className?

string

Sets additional classes to the AutoComplete.

clearButton?

boolean

By default, the AutoComplete renders a button on hovering over the component, which resets the value. If clearButton is set to false, the button will not be rendered.

data?

any[]

Sets the data of the AutoComplete (more information and example).

defaultValue?

string

Sets the default value of the AutoComplete. Similar to the native input HTML element.

dir?

string

Represents the dir HTML attribute.

disabled?

boolean

Sets the disabled state of the AutoComplete.

fillMode?

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

solid

Configures the fillMode of the AutoComplete.

The available options are:

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

React.ReactNode

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

header?

React.ReactNode

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

id?

string

Specifies the id of the component.

label?

string

Renders a floating label for the AutoComplete.

loading?

boolean

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

name?

string

Specifies the name property of the input DOM element.

This property is part of the FormComponentProps interface.

opened?

boolean

Sets the opened and closed state of the AutoComplete.

placeholder?

string

The hint that is displayed when the AutoComplete is empty.

popupSettings?

DropDownsPopupSettings

Configures the popup of the AutoComplete.

readonly?

boolean

Sets the read-only state of the AutoComplete.

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

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

The available options are:

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

style?

React.CSSProperties

The styles that are applied to the AutoComplete.

suggest?

string | boolean

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

tabIndex?

number

Specifies the tabIndex of the AutoComplete.

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.

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?

string

Sets the value of the AutoComplete (more information and example).

Methods

focusedItemIndex

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

<AutoComplete focusedItemIndex={focusedItemIndex} />
Parameters

data

any

inputText

string

textField?

string

Returns

number

itemRender

Fires when an AutoComplete list 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 AutoComplete gets blurred.

Parameters

event

AutoCompleteBlurEvent

onChange

Fires each time the value of the AutoComplete is about to change (more information and example).

Parameters

event

AutoCompleteChangeEvent

onClose

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

Parameters

event

AutoCompleteCloseEvent

onFocus

Fires each time the user focuses the AutoComplete.

Parameters

event

AutoCompleteFocusEvent

onOpen

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

Parameters

event

AutoCompleteOpenEvent

valueRender

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

Parameters

rendering

ReactElement<HTMLSpanElement>

Returns

ReactNode