Row select action includes full item #10
alexjennings
started this conversation in
Ideas
Replies: 1 comment
-
There is a findNodeById helper function to retrieve a node by id from a tree:
You could try this one first. However, you are right that this is inefficient, because we could pass the node right away. If you are going to propose the change as a PR for the select feature, I'd say we would have to add it to Glad that you enjoy working with the library :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @rwieruch , I have been trying this out for a new project and really enjoying it so far! I've hit a slight problem where I want to use the row select where the action includes all of the item data for the row instead of just the
id
. Theid
would be simple to look up for a simple array but I would like to combine this with the tree layout which means traversing through thenode
arrays.I'm guessing a change would need to be made here https://github.com/table-library/react-table-library/blob/master/src/select/useRowSelect.js#L48 so would you consider a PR or do you feel it would add too much complexity? Just wanted to get your feeling before I start work on one!
Beta Was this translation helpful? Give feedback.
All reactions