Unable to setState or use selectedNodes #541
Replies: 3 comments
-
What do you mean? |
Beta Was this translation helpful? Give feedback.
-
I tried to use those selectedNodes by injecting them into a state like
setData(selectedNodes).. This call is interrupting check box functionality.
…On Tue, 4 Jan, 2022, 3:37 am Hrusikesh Panda, ***@***.***> wrote:
Any code injection into onChange function like setting state using hook or
dispatch checkbox functionality is not working.
What do you mean?
—
Reply to this email directly, view it on GitHub
<#538 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUKEGS7X2OOM5KS7ACJOWGLUUIMY3ANCNFSM5K7QV3ZA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
So you're most likely re-rendering the component. The component maintains its own state so you can take a look at https://github.com/dowjones/react-dropdown-tree-select/blob/develop/docs/HOC.md#prevent-re-render-on-parent-propstate-changes approach. If you search the old issues, there's a hooks based implementation as well. |
Beta Was this translation helpful? Give feedback.
-
Any code injection into onChange function like setting state using hook or dispatch checkbox functionality is not working.
Beta Was this translation helpful? Give feedback.
All reactions