Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stop checked value clear when refresh #405

Open
niku2021 opened this issue Jan 26, 2023 · 1 comment
Open

stop checked value clear when refresh #405

niku2021 opened this issue Jan 26, 2023 · 1 comment
Labels

Comments

@niku2021
Copy link

niku2021 commented Jan 26, 2023

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.

@jakezatecky
Copy link
Owner

jakezatecky commented Jan 27, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants