react-checkbox-tree icon indicating copy to clipboard operation
react-checkbox-tree copied to clipboard

stop checked value clear when refresh

Open niku2021 opened this issue 2 years ago • 1 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.

niku2021 avatar Jan 26 '23 12:01 niku2021

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.

jakezatecky avatar Jan 27 '23 02:01 jakezatecky