-
Notifications
You must be signed in to change notification settings - Fork 8
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
TableCellView tabbableChildren should support changing dynamically #2210
Comments
Of note, we may be avoiding a potential error case related to this just due to the focusedRecycleCallback right now - if an anchor is focused when data changes, it'll be blurred, in which case focus resets to the cell. So we shouldn't end up in a case where cellContentIndex is out of bounds even if tabbableChildren changed (anchor link present in initial data, not in updated data). Edit: Even with the PR where focusedRecycleCallback is removed, this doesn't look like it's an issue. |
@fredvisser was mentioning the possibility of editable table cells where on interaction (click / touch / keyboard cell enter) the cell contents are replaced (or text -> numeric text field) and on commit / cancel switched back (numeric text field -> text). Need to prototype but possible this issue may need to be addressed for that. |
🧹 Tech Debt
Currently
TableCellView
tabbableChildren
is assumed to be static (or at least, the number of elements in it not changing). This may not be true generally - changes to table/ column configuration may necessitate it changing (more/less interactive elements in a cell; alternatively, an interactive element may get disabled, in which case it's no longer tabbable, and should no longer be included).We should consider making this property
@observable
, and updating keyboard focus as needed if it changed (re-focus cell if it changes or the current focus is no longer valid, potentially).See PR comment thread
The text was updated successfully, but these errors were encountered: