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 nth child selector in data grid header #15482
Conversation
@appel1 for debugging, you can also use |
You can test this PR using the following package version. |
@timunie Thanks for that, made things easier. But why was the PR closed when I added another commit to it? |
Not sure if this is the correct approach, but as far as I can tell it works after these changes. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
Realized that taking visibility might be a bad idea. If you change visibility in the selector for example. I'll check how this is handled elsewhere in Avalonia and update the PR. I think nth child in CSS counts elements even if they are hidden. |
Yes, nth child does count elements if they are hidden. The same goes with avalonia nth child, IIRC. |
What about the hidden DataGridFillerColumn? Should that also be taken into account? So that nth-last-child(1) matches the filler column. |
@cla-avalonia recheck |
|
You can test this PR using the following package version. |
@cla-avalonia agree |
What does the pull request do?
Attempt at getting nth child selectors to work with data grid column headers.
What is the current behavior?
If you add or remove columns :nth-child and :nth-last-child applies to the wrong element.
What is the updated/expected behavior with this PR?
That nth-child and nth-last-child applies to the expected elements after adding or removing columns.
Fixed issues
Fixes #14695