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!
<TreeMenu
openNodes={["mammal","canidae"]}
activeKey="mammal/canidae/dog"
data={dataInArray}
>
{({ search, items }) => {
return (
<>
<input onChange={(e) => search(e.target.value)} />
{items.map((props) => {
const childrenProps = {
...props,
onClick: () => window.open(props.url)
// style: { color: props.color || "black" }
};
return <ItemComponent {...childrenProps} />;
})}
</ul>
</>
);
}}
</TreeMenu>
</div>`
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.
Hi @iannbing, First of all, Thanks for the wonderful library which helped me a lot.
But I am facing lil issue with the
openNodesprop. let me show you the code.`
Hello CodeSandbox
Start editing to see some magic happen!
<TreeMenu
openNodes={["mammal","canidae"]}
activeKey="mammal/canidae/dog"
data={dataInArray}
>
{({ search, items }) => {
return (
<>
<input onChange={(e) => search(e.target.value)} />
{items.map((props) => {
const childrenProps = {
...props,
onClick: () => window.open(props.url)
// style: { color: props.color || "black" }
};
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 tilldog.