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

Nimble Table: cell view (custom element) and cell state changes #1138

Merged
merged 12 commits into from
Apr 4, 2023

Conversation

msmithNI
Copy link
Contributor

@msmithNI msmithNI commented Mar 28, 2023

Pull Request

🀨 Rationale

Fixes #997

πŸ‘©β€πŸ’» Implementation

Implementation is similar to what was outlined in the the HLD (PR):

  • Add a TableCellView<TCellRecord, TColumnConfig> class. TableCellView instances will be used in TableCells, instead of the old approach (column-provided cellTemplate and cellStyles).
  • Add cellViewTag property to TableColumn (links the column with the associated TableCellView type)
  • TableCellView defines a focusedRecycleCallback() method which is a no-op by default. If a cell view contains a focusable element, and a cell is focused, and then a scroll (row recycle) occurs, this gives the cell view an opportunity to commit/blur/etc.
    • We don't yet have a column type exercising this, but there's a new autotest for this code path.
  • If a cell action menu is open when a scroll/ row recycle occurs, the action menu is closed (via the associated menu button).

πŸ§ͺ Testing

  • Updated existing autotests
  • Added new tests for focusedRecycleCallback and the code that closes action menus on scroll
  • Manually tested table in Storybook + Angular + Blazor example apps

βœ… Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@msmithNI msmithNI marked this pull request as ready for review March 28, 2023 22:04
@mollykreis mollykreis mentioned this pull request Mar 29, 2023
1 task
@jattasNI jattasNI mentioned this pull request Apr 4, 2023
1 task
@msmithNI msmithNI merged commit 91172d9 into main Apr 4, 2023
@msmithNI msmithNI deleted the table-cell-custom-elements branch April 4, 2023 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table virtualization: Clear/Commit (and potentially save/restore) row/cell state when scrolling
5 participants