iannbing / iannbing/react-simple-tree-menu
Is there a way to make ItemComponent active and its parent nodes open at the same time ?
Open
- Dominant language
- TypeScript
- Stars
- 138
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
Hi @iannbing, First of all, Thanks for the wonderful library which helped me a lot.
But I am facing lil issue with the `openNodes` prop. let me show you the code.
`
Hello CodeSandbox
Start editing to see some magic happen!
{({ search, items }) => {
return (
<>
search(e.target.value)} />
{items.map((props) => {
const childrenProps = {
...props,
onClick: () => window.open(props.url)
// style: { color: props.color || "black" }
};
return ;
})}
);
}}
Here, I tried to open all the parent nodes till their children, but it is just opening the first parent let's say `mammal`. also, I m unable to expand(also click) the rest of the parents till `dog`.
Contributor guide
Assessment
This issue has not been assessed yet.