jakezatecky / react-checkbox-tree

A simple and elegant checkbox tree for React.

Home Page:https://jakezatecky.github.io/react-checkbox-tree/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stop checked value clear when refresh

niku2021 opened this issue · comments

this is my sample.

https://codesandbox.io/s/react-checkbox-tree-example-forked-fdq7gl?file=/src/components/Widget.js

I have many tabs in my own page. So if i checked a value and click another tab and come again to treeview tab my checkbox is clearing. I want to stop it. Is there a event to checked the value without click it.

It sounds like your application is re-mounting the entire tree component, and thus reverting to the initial state. The solution is highly dependent on how your application functions, but it sounds like you need to persist the checked state and recall its value when the component is re-mounted, or you need to stop the application from re-mounting the component.

Unfortunately, I cannot provide much assistance, as this appears to be an issue outside of this library.