TreeListProps

Represents the props of the KendoReact TreeList component.

cellRender? (defaultRendering: ReactElement<HTMLTableCellElement> | null, props: TreeListCellProps) => ReactElement<HTMLTableCellElement> | null

Fires when a cell is about to be rendered. Useful for overriding the default rendering of the cell.

className? string

Sets custom CSS classes to the TreeList DOM element.

columns? TreeListColumnProps[]

A collection of TreeListColumnProps for creating columns.

data? any[]

Sets the data of the TreeList.

editField? string

Specifies the name of the field which will provide a Boolean representation of the edit state of the current item (more information and examples).

editRow? React.ComponentType<TreeListRowProps>

If set and when the data item is in edit mode, the editRow value will be rendered.

expandField string

Specifies the name of the field which will provide a Boolean representation of the expanded state of the item.

filter? FilterDescriptor[]

The descriptors by which the data is filtered (more information and examples). This affects the values and buttons in the FilterRow of the TreeList.

filterRow? React.ComponentType<FilterRowProps>

If set, it will be rendered instead of the default FilterRow TreeList component.

headerCellRender? (defaultRendering: React.ReactNode | null, props: TreeListHeaderCellProps) => React.ReactNode

Fires when a header cell is about to be rendered. Useful for overriding the default rendering of the header cell.

noRecords? ReactElement<TreeListNoRecordsProps>

Represents the component that will be rendered when the data property of the TreeList is empty or undefined.

onDataStateChange? (event: TreeListDataStateChangeEvent) => void

Fires when the data state of the TreeList is changed.

onExpandChange? (event: TreeListExpandChangeEvent) => void

Fires when the user clicks on the expand or collapse icon of a row.

onFilterChange? (event: TreeListFilterChangeEvent) => void

Fires when the TreeList filter is modified through the UI (more information and examples). You have to handle the event yourself and filter the data.

onHeaderSelectionChange? (event: TreeListHeaderSelectionChangeEvent) => void

Fires when the user clicks the checkbox of a column header whose field matches selectedField (more information and example).

onItemChange? (event: TreeListItemChangeEvent) => void

Fires when the user changes the values of the item. The event is not debounced and fires on every onChange event of the input in the current EditCell (more information and examples).

onRowClick? (event: TreeListRowClickEvent) => void

Fires when the user clicks a row.

onSelectionChange? (event: TreeListSelectionChangeEvent) => void

Fires when the user tries to select or deselect a row (more information and example).

onSortChange? (event: TreeListSortChangeEvent) => void

Fires when the sorting of the TreeList is changed (see example). You have to handle the event yourself and sort the data.

rowHeight? number

Defines the row height and implements equal heights for all rows.

rowRender? (row: ReactElement<HTMLTableRowElement>, props: TreeListRowProps) => React.ReactNode

Fires when a row is about to be rendered. Useful for overriding the default rendering of the row.

scrollable? ScrollMode

Defines the scroll mode of the TreeList.

The available options are:

  • none—Renders no scrollbar.
  • scrollable—Represents the default scroll mode of the TreeList. Requires you to set the overflow and height (for vertical scrolling), or width (for horizontal scrolling) styles.

selectedField? string

Specifies the name of the field which will provide a Boolean representation of the selected state of the item (see example).

sort? SortDescriptor[]

The descriptors by which the data is sorted. Applies the sorting styles and buttons to the affected columns.

sortable? TreeListSortSettings

Enables the sorting (see example).

style? CSSProperties

Represents the style HTML attribute.

subItemsField string

Specifies the name of the field which will provide an array representation of the item subitems.

tableProps? React.DetailedHTMLProps<TableHTMLAttributes<HTMLTableElement>>

A props object that will be passed to the underlying HTML table.

toolbar? ReactElement<TreeListToolbarProps>

Represents the TreeList toolbar component.

 /