react-arborist
react-arborist copied to clipboard
Internal ID mapping in case of custom idAccessor
Hi and thanks for a great tree component, really awesome!
I've noticed one thing, when in case of custom idAccessor (e.g. uid instead of id), internal logic is still relying on "id" in some places. For example drag and drop reorder/move works through useSimpleTree and there goes direct mapping through id, without check for idAccessor property.
Best regards, Alexander Yanchuk
You are correct. That is a gap that needs closing. useSimpleTree should accept the accessor arguments. The useSimpleTree hook is not really documented as public API, but several people have found it and found this limitation. I'd welcome a PR if you're up for it. It shouldn't be too difficult.
Thanks, schedule is a bit tight now, but I'll try