Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onSelect & row index #1505

Closed
stephanebarbey opened this issue Jul 24, 2017 · 4 comments
Closed

onSelect & row index #1505

stephanebarbey opened this issue Jul 24, 2017 · 4 comments

Comments

@stephanebarbey
Copy link

I have a use case where I need to duplicate the selected rows in a table. So far so good, I can easily get the row selection.

My problem is that I should duplicate them in the order in which they appear in the table, which could be sorted, i.e. the order of the row keys does not match the order in which the rows appear in table.

Would it be possible to have a fourth parameter to the onSelect callback (row, isSelected, e, rowIndex), or, alternatively, is there a callback that yields me the index of a given row (key)? (or should I directly look in state.data?)

Thanks.

@AllenFang
Copy link
Owner

@stephanebarbey, I think pass the rowIndex as fourth argument is possible in next version, thanks

@stephanebarbey
Copy link
Author

that would be great! Thanks.

AllenFang added a commit that referenced this issue Jul 29, 2017
@AllenFang
Copy link
Owner

@stephanebarbey, this feature was implemented on v3.5.0, now you can get the rowIndex on onSelect's fourth argument.

@DANIELADIKO
Copy link

DANIELADIKO commented Dec 27, 2018

yes we can get the rowIndex, it's helpful, thanks for that @AllenFang , but the doc is not update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants