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

Uncaught TypeError: e[n].forEach is not a function

Clementol opened this issue · comments

Uncaught TypeError: e[n].forEach is not a function
The main tree is working but to show the children is the problem following the example at npm website

Expected to show sub tree
I expected drop down to show

Im getting the same issue, but someone on my team has it working. Copying his code doesnt resolve my issue

Can you link to a live version which shows this issue, using this CodeSandbox reference point as a base?

i got this issue when i use hooks in checked and expanded: checked => setChecked( { checked }).
remove "{" and "}" work for me : checked => setChecked( checked ).

That is possible error others may be experiencing. The checked, expanded, and nodes property should all be Arrays.

Since the docs all reference functional/hook usage now, this should no longer be confusing to developers without class experience.