• What is KendoReact
  • Getting Started
  • Server Components
  • Components
    • Animation
    • Barcodes
    • Buttons
    • Chartsupdated
    • Common Utilities
    • Conversational UIupdated
    • Data Gridupdated
    • Data Query
    • Data Tools
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Formupdated
    • Ganttupdated
    • Gauges
    • Indicators
    • Inputsupdated
    • Labels
    • Layoutupdated
    • ListBox
    • ListView
    • Map
    • Notification
    • OrgChartnew
    • PDF Processing
    • PDFViewer
    • PivotGrid
    • Popup
    • Progress Bars
    • Ripple
    • Scheduler
    • ScrollView
    • Sortable
    • Spreadsheetupdated
    • TaskBoard
    • Tooltips
    • TreeList
    • TreeViewupdated
    • Upload
  • Sample Applications
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Changelog
  • Updates
  • Troubleshooting

DropDownTree

Represents the DropDownTree component.

Accepts properties of type DropDownTreeProps. Obtaining the DropDownTreeHandle.

A Functional Component.

const selectField = "selected";
const expandField = "expanded";
const dataItemKey = "id";
const textField = "text";
const subItemsField = "items";
const fields = {
 selectField,
 expandField,
 dataItemKey,
 subItemsField,
};
 const App = () => {
 const [value, setValue] = React.useState(null);
 const [expanded, setExpanded] = React.useState([data[0][dataItemKey]]);
 const onChange = (event) => setValue(event.value);
 const onExpandChange = React.useCallback(
   (event) => setExpanded(expandedState(event.item, dataItemKey, expanded)),
   [expanded]
 );
 const treeData = React.useMemo(
   () =>
     processTreeData(
       data,
       {
         expanded,
         value,
       },
       fields
     ),
   [expanded, value]
 );

 return (
     <DropDownTree
       style={{
         width: '300px',
       }}
       placeholder="Please select ..."
       data={treeData}
       value={value}
       onChange={onChange}
       textField={textField}
       dataItemKey={dataItemKey}
       selectField={selectField}
       expandField={expandField}
       onExpandChange={onExpandChange}
     />
 );
};
ReactDOM.render(<App />, document.querySelector('my-app'));
NameTypeDefaultDescription

props

DropDownTreeProps intersected with RefAttributes<undefined>

The props of the DropDownTree component.

In this article

Not finding the help you need?