Trying to get this to work in a functional component instead of a class component. I'd think it'd be similar, nothing I've tried has worked though. Any chance someone could post an example of this working in a functional component?
Hi Jim,
Based on the shared details, we have prepared the React Dropdown Tree sample using the functional component.
For your reference, we have attached the sample, demo, and documentation.
Sample:
https://stackblitz.com/edit/react-byquxq?file=index.js
Demo: https://ej2.syncfusion.com/react/demos/#/material/drop-down-tree/default
Documentation: https://ej2.syncfusion.com/react/documentation/drop-down-tree/getting-started
Regards,
Prasanth Madhaiyan.
Hi All i am getting issue in setting the default value in react tree grid inside a dropdownlistcomponent can anyone help me out . using functional component.
const CoaAccountCategories =
[ { "AccountID": 26, "AccountCode": "0100", "AccountName": "Assets", "BalanceSheet": true, "Status": true, "Posting": null, "SubLevel": 0, "Code": "A", "AccountTypeId": 4, "ParentId": null }, { "AccountID": 35, "AccountCode": "0400", "AccountName": "Liabilities", "BalanceSheet": true, "Status": true, "Posting": null, "SubLevel": 0, "Code": "L", "AccountTypeId": 5, "ParentId": null } ]
Hi Rohan,
The reported problem occurs only when TreeGrid datasource doesn’t contain AccountTypeId (Dropdown fields.value). For your query, we have prepared sample based on the provided code and we have used your datasource for treeGrid and dropDownList which is working as expected. If the TreeGrid datasource contains the AccountTypeId field, then kindly share the TreeGrid datasource details to proceed further. Refer below attached sample.
Sample - 3yvb8b (forked) - StackBlitz
Regards,
Sridharan