I'm using a basic Tree component with a custom nodeTemplate. I was wondering if there is a way to expand/collapse using the label, and not just the toggler. Any and all help is greatly appreciated!
Code: Select all
const nodeTemplate = (node) => {
<div>
<!-- Use this button expand/collapse
<button>{node.label}</button>
</div>
}
<Tree
value={menuData}
className="dropdownTree"
nodeTemplate={nodeTemplate}
/>