minop1205 / react-dnd-treeview

A draggable / droppable React-based treeview component. You can use render props to create each node freely.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

t.tree.filter is not a function

maxivane opened this issue · comments

Hello, I use nodejs and this error is giving me, does anyone know how to solve it?

image

@maxivane thank you for your report!
Please give me some more information to help me solve this problem.

  • node version
  • npm version
  • this package version
  • and other dependencies (in package.json)

Or if there is any way to reproduce the error, please let me know.

If you are using any state manager that uses proxies like mobx , this error occurs. I have the same problem.
Mobx versions:
"mobx": "^6.3.2",
"mobx-react": "^7.2.0",

@yagizhanavci Thanks for the detailed info!

I think it is probably due to the use of immer inside the Treeview package.

I've just published a version that doesn't use immer, can you try this one?

npm install --save @minoru/react-dnd-treeview@alpha

If everything looks good, I will include this fix in the next official release.

I have published v1.5.11 today. This version does not use immer to generate new node arrays, so it does not conflict with libraries like mobx that use proxy.

If the problem still occurs, it would be helpful if you could give me a minimal configuration to reproduce it.