frontend-collective / frontend-collective/react-sortable-tree

Prop searchMethod triggers onChange when loaded

Open
#376 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5k
Forks
914
PR merge metrics
No merged PRs in 30d

Description

I found something funky, not sure if it is by design or is it bug. I have two similar sandboxes here:
https://codesandbox.io/s/0p5oppl88n
https://codesandbox.io/s/9o526528oy
Only difference is that the first one has search method while in the second example search method is commented out. If you open console, you will see that search method somehow causes onChange to happen (twice!) when sortable tree is loaded. You don't need to type anything into search input. By my opinion this is wrong, because user doesn't change anything on sortable tree, however onChange happens.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.