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!: exclude hidden columns from sorting (24.4) #6927

Merged
merged 8 commits into from
Dec 15, 2023

Conversation

vursen
Copy link
Contributor

@vursen vursen commented Dec 7, 2023

Description

The PR updates the grid sorting logic so that it excludes hidden columns from sorting and includes them when they are shown again.

Precedes:

Part of vaadin/flow-components#5513

Type of change

  • Bugfix

@vursen vursen force-pushed the fix/grid/exclude-hidden-sort-columns-from-sorting branch from 4f12326 to 7a52b83 Compare December 7, 2023 11:44
assertColumnCellOrder(columns[1], ['1', '2', '3']);
});

it('should update sort order when column removed and grid is not attached', () => {
Copy link
Contributor Author

@vursen vursen Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: The sorters' order property becomes null for the time the grid is disconnected. It's a limitation of the new implementation which doesn't distinguish whether the column is hidden or the entire grid is hidden. I've assumed that it's not a big deal considering that the order property is restored to its original value when the grid is re-connected.

@vursen vursen changed the title [WIP] fix: exclude hidden columns from sorting fix: exclude hidden columns from sorting Dec 11, 2023
@vursen vursen marked this pull request as ready for review December 11, 2023 09:02
@vursen vursen changed the title fix: exclude hidden columns from sorting fix!: exclude hidden columns from sorting Dec 11, 2023
@vursen vursen changed the title fix!: exclude hidden columns from sorting [BLOCKED] fix!: exclude hidden columns from sorting Dec 11, 2023
@vursen
Copy link
Contributor Author

vursen commented Dec 11, 2023

⚠️ The PR is blocked until 24.3 is branched out.

packages/grid/src/vaadin-grid-sort-mixin.js Outdated Show resolved Hide resolved
packages/grid/src/vaadin-grid-sort-mixin.js Show resolved Hide resolved
Copy link

sonarcloud bot commented Dec 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vursen vursen changed the title [BLOCKED] fix!: exclude hidden columns from sorting [24.4] fix!: exclude hidden columns from sorting Dec 12, 2023
@vursen vursen changed the title [24.4] fix!: exclude hidden columns from sorting fix!: exclude hidden columns from sorting (24.4) Dec 12, 2023
@vursen vursen merged commit 37fdac8 into main Dec 15, 2023
9 checks passed
@vursen vursen deleted the fix/grid/exclude-hidden-sort-columns-from-sorting branch December 15, 2023 07:18
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.4.0.alpha1 and is also targeting the upcoming stable 24.4.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants