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

Fix bug with indentation of nested parent rows #1839

Merged
merged 3 commits into from
Feb 20, 2024
Merged

Conversation

mollykreis
Copy link
Contributor

Pull Request

🤨 Rationale

This fixes a bug I found where the indentation of nested parent rows can sometimes be incorrect, particularly when the order of rows changes (such as when sorting a column) in a way that changes the nesting level that is set on a nimble-table-row element that is getting reused during a binding update.

The problematic binding was this condition in the table row's template: x.isParentRow && x.nestingLevel > 0. That statement is volatile, but it cannot be marked as such in the template. Therefore, I moved the evaluation into a getter named isNestedParent that could be marked as @volatile.

👩‍💻 Implementation

See Rationale section above

🧪 Testing

Manually tested in storybook with a problematic set of data that I found the problem with

✅ Checklist

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

@mollykreis
Copy link
Contributor Author

@atmgrifter00, will you buddy this PR for me?

@mollykreis mollykreis marked this pull request as ready for review February 19, 2024 22:31
@mollykreis mollykreis enabled auto-merge (squash) February 20, 2024 17:19
@mollykreis mollykreis merged commit c6c16de into main Feb 20, 2024
10 checks passed
@mollykreis mollykreis deleted the fix-parent-row-indent branch February 20, 2024 17:36
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.

4 participants