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

feat(addon-table): disable column sorting on demand #9382

Closed

Conversation

tsironis13
Copy link

@tsironis13 tsironis13 commented Oct 8, 2024

Fixes #8244

image
The idea is to enable sorting only for columns where the [requiredSort]="true" is provided

Copy link

lumberjack-bot bot commented Oct 8, 2024

Pull request was closed ✔️

All saved screenshots (for current PR) were deleted 🗑️

@splincode splincode changed the title Disable column sorting on demand feat(addon-table): disable column sorting on demand Oct 8, 2024
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.13%. Comparing base (4a26b1a) to head (79e0ea9).
Report is 355 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9382      +/-   ##
==========================================
- Coverage   75.68%   75.13%   -0.56%     
==========================================
  Files        1216     1234      +18     
  Lines       19068    19407     +339     
  Branches     2091     2018      -73     
==========================================
+ Hits        14432    14581     +149     
- Misses       4592     4783     +191     
+ Partials       44       43       -1     
Flag Coverage Δ
summary 75.13% <ø> (-0.56%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

bundlemon bot commented Oct 8, 2024

BundleMon

Unchanged files (5)
Status Path Size Limits
demo/browser/main.(hash).js
294.52KB +10%
demo/browser/vendor.(hash).js
247.33KB +10%
demo/browser/runtime.(hash).js
42.98KB +10%
demo/browser/styles.(hash).css
16.27KB +10%
demo/browser/polyfills.(hash).js
11.18KB +10%

Total files change -1B 0%

Unchanged groups (1)
Status Path Size Limits
demo/browser/*..js
7.11MB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@waterplea
Copy link
Collaborator

This is not what the fix needs to be. The issue was about making tuiSortable dynamic. But looking at it again I don't think we need it at all. All it does it connect sorter with key, I think it is already working as expected. This current PR is definitely not right, requiredSort means when you click the column it switches from asc/desc and never to unsorted, unlike other columns with sorter which disable sorting on 3rd click.

@waterplea waterplea closed this Oct 8, 2024
@tsironis13
Copy link
Author

tsironis13 commented Oct 8, 2024

This is not what the fix needs to be. The issue was about making tuiSortable dynamic. But looking at it again I don't think we need it at all. All it does it connect sorter with key, I think it is already working as expected. This current PR is definitely not right, requiredSort means when you click the column it switches from asc/desc and never to unsorted, unlike other columns with sorter which disable sorting on 3rd click.

Ok @waterplea , can we disable sorting dynamically for some columns with the current codebase?
image
my point is, if we have a way to provide this UI functionality to the end user and I am asking because I am new to the project and maybe I am missing something. Otherwise, it would be nice to create a new PR and provide this option also.

@waterplea
Copy link
Collaborator

@tsironis13 sorry, I was sure I posted the explanation in the issue but it looks like I only typed it and forgot to press "Send" :) I ended up doing this PR myself because as I looked into the actual issue it turned out to be not as simple as I thought. It's going to be fixed in today's release.

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

Successfully merging this pull request may close these issues.

🚀 - Allow tuiSortable to configured dynamically
3 participants