-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug where table rows are not rendered correctly when the table is…
… reattached to the DOM (#1766) # Pull Request ## 🤨 Rationale Fixes #1753 ## 👩💻 Implementation The bug in the existing code is that the table's viewport always reset to a scroll position of 0 when reconnected, but the virutalizer maintained its state of being scrolled to a certain position. To fix this problem, I updated the table's viewport scroll position to match the virtualizer's scroll position once the state of the virtualizer has been updated upon reconnection of the `nimble-table` element. ## 🧪 Testing - Manually tested - Wrote some new unit tests that verify that the scroll position and rendered rows are as expected when the table is disconnected and reconnected. This includes tests that update the data while the table is not connected. ## ✅ Checklist <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [ ] I have updated the project documentation to reflect my changes or determined no changes are needed. --------- Co-authored-by: Milan Raj <rajsite@users.noreply.github.com>
- Loading branch information
1 parent
3ff4ef4
commit c3ba509
Showing
3 changed files
with
154 additions
and
7 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-components-b7ec8e55-4c71-40d3-95d2-471852f4ef99.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Fix bug where table rows are not rendered correctly when the table is reattached to the DOM", | ||
"packageName": "@ni/nimble-components", | ||
"email": "20542556+mollykreis@users.noreply.github.com", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters