react-accessible-treeview icon indicating copy to clipboard operation
react-accessible-treeview copied to clipboard

Check existence of node during expand/collapse before acting on it

Open jej2003 opened this issue 10 months ago • 4 comments

update handling of expanding/collapsing nodes to ensure they exist in the tree

addresses #191

jej2003 avatar Mar 22 '25 16:03 jej2003

@mellis481, @yhy-1 do either of you have capacity to review this?

@jej2003 if it doesn’t have unit tests, can you add one?

dgreene1 avatar Mar 22 '25 17:03 dgreene1

@dgreene1 i will look to add one today. Is there a good starting point you could recommend? If not I’ll see if anything exists to base it on

jej2003 avatar Mar 22 '25 17:03 jej2003

@dgreene1 , take a look at the updated changes with tests. Any feedback would be appreciated, thanks!

jej2003 avatar Mar 23 '25 02:03 jej2003

Philosophically do we want the implementation to be capable of handling data being passed to expandedIds/selectedIds that may not exist in the tree or do we still want to throw in those situations? The changes I implemented and as are demonstrated in the tests make it so that if any ids in expandedIds/selectedIds don't exist the tree will not crash. Conversely, if we want that to still happen then I believe a smaller change is possible. Alternative approach is available at https://github.com/dgreene1/react-accessible-treeview/pull/217/files

jej2003 avatar Mar 23 '25 12:03 jej2003

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 22 '25 13:05 stale[bot]

Gentle poke so that this doesn’t go stale.

jej2003 avatar May 22 '25 13:05 jej2003

@dgreene1 good morning! I noticed this and #217 need rebasing, any opinions on which to focus on and which to close? Anything else I can provide to help move this one towards a review? Thanks!

jej2003 avatar May 31 '25 12:05 jej2003