-
Notifications
You must be signed in to change notification settings - Fork 138
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
Allow setting selected row on VirtualizedList (FlatList/SectionList) by clicking a row #539
Comments
@lyahdav I assume this is behavior you want for all keyboard platforms, not just macOS, is that correct? Just want to confirm this is something we also want in Windows. If so I can transfer this issue to that repo or create a tracking issue as we'll need to do work in both. |
Sorry for delay here. We ended up not using the VirtualizedList row selection features for now so this isn't a priority. I think it makes sense for this to be implemented for all platforms eventually. |
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Heh. I ended up implementing this recently with a 'selectRowAtIndex' method on the listRef. |
Proposal: Allow setting selected row on VirtualizedList (FlatList/SectionList) by clicking a row
Summary
Currently
VirtualizedList
has aselectedRowIndex
in its state that gets set when pressing up/down arrow keys if you set theenableSelectionOnKeyPress
prop totrue
. But typically you can select a selected row in a list component also by clicking on a row. Right nowVirtualizedList
doesn't expose a way to do so.Motivation
In Summary.
Basic example
Perhaps it would be sufficient to add a
selectedRowIndex
prop?Open Questions
Possibly as part of this PR this should get upstreamed to RN core.
The text was updated successfully, but these errors were encountered: