New to Kendo UI for Vue? Start a free 30-day trial

DropDownTree

Component

Represents the Kendo UI for Vue DropDownTree component. Use the DropDownTree to select a single item from hierarchical data.

Definition

Package:@progress/kendo-vue-dropdowns

Properties Interface:DropDownTreeProps

Syntax:

vue
<DropDownTree :data-items="treeData" :data-item-key="'id'" :text-field="'text'" :placeholder="'Please select ...'" />

Properties

Sets the accessKey attribute of the DropDownTree.

adaptive?

boolean

Changes the rendering of the popup based on the screen size.

Sets the title of the adaptive popup.

Sets the id values of the elements that describe the DropDownTree, like the HTML aria-describedby attribute. For example, these elements can contain an error or a hint message.

Sets the aria-label attribute of the DropDownTree.

Sets the id values of the elements that label the DropDownTree.

Sets additional CSS classes to the DropDownTree.

Sets the key that the DropDownTree uses to compare the data items (see example). When you do not set dataItemKey, the DropDownTree compares the items by reference.

Sets the data of the DropDownTree (see example).

Default:

[]

dir?

string

Sets the dir HTML attribute of the DropDownTree.

disabled?

boolean

Sets the disabled state of the DropDownTree.

Sets the name of the field that holds the boolean expanded state of the item.

fillMode?

"solid" | "outline" | "flat"

Configures the fillMode of the DropDownTree.

The available options are:

  • solid
  • flat
  • outline
Default:

undefined

filter?

string

Sets the value of the filter input. Use it when you want to control the filter input.

Turns on the filtering of the DropDownTree (more information and examples).

Sets the slot that renders the footer of the popup (see example).

Sets the slot that renders the header of the popup (see example).

id?

string

Sets the id of the focusable element of the DropDownTree. The floating label uses it as its target.

Sets the slot that renders each DropDownTree item (see example).

label?

string

Renders a floating label for the DropDownTree.

Sets the slot that the DropDownTree popup renders when there is no data (see example).

loading?

boolean

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

Sets the value of the DropDownTree when you use v-model.

name?

string

Sets the name property of the input DOM element.

Fires each time the DropDownTree loses focus.

Parameters:eventDropDownTreeBlurEvent

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

Parameters:eventDropDownTreeChangeEvent

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

Parameters:eventDropDownTreeCloseEvent

onExpandChange?

(event: any) => void

Fires when the user expands or collapses an item (see examples).

Parameters:eventany

Fires each time the user types in the filter input (see example). You can filter the data based on the passed filter value.

Fires each time the DropDownTree receives focus.

Parameters:eventDropDownTreeFocusEvent

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

Parameters:eventDropDownTreeOpenEvent

opened?

boolean

Sets whether the popup of the DropDownTree is open.

Sets the hint that the DropDownTree shows when it is empty.

Configures the popup of the DropDownTree.

Default:

{ animate: true, height: '200px', anchor: '' }

required?

boolean

Sets whether null is a valid value for the component.

rounded?

"none" | "small" | "medium" | "large" | "full"

Configures the roundness of the DropDownTree.

The available options are:

  • none
  • small
  • medium
  • large
  • full
Default:

undefined

Sets the name of the field that holds the boolean selected state of the item.

Default:

'selected'

size?

"small" | "medium" | "large"

Configures the size of the DropDownTree.

The available options are:

  • small
  • medium
  • large
Default:

undefined

Sets the name of the field that holds the array of child items.

Default:

'items'

tabIndex?

number

Sets the tabIndex attribute of the DropDownTree.

textField

string

Sets the data item field that holds the item text (see example).

valid?

boolean

Overrides the validity state of the component. When you set valid, the component ignores the required property.

Sets the form error message of the component. If you set it to an empty string, the component shows no error.

Shows or hides the invalid state styles of the component. When you set it to false, the component shows no invalid state styles.

Sets the value of the DropDownTree (see example). The value can be an object from the data tree.

Sets a function that returns the value to submit. The DropDownTree renders the returned value in an option of a hidden select element.

Parameters:valueanyReturns:

any

Example:
vue
<form>
    <DropDownTree
        :data-items="[{ text: 'Austria', id: 1 }, { text: 'Belarus', id: 2 }]"
        :data-item-key="'id'"
        :text-field="'text'"
        :value-map="(value) => value && value.id"
    />
    <button type="submit">Submit</button>
</form>

Sets the slot that renders the selected value (see example).

References

Represents the ref of the DropDownTree component.