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

Choose position to freeze tabulator columns. #6309

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

CTPassion
Copy link
Contributor

As a solution to my issue #5901

Columns are ordered by the panel BE and afterwards given the "frozen": True attribute. Hence to freeze to the right of the table, those columns just needed to be put at the end of the ordered list.

The solution to freeze "left" or "right" only I think makes the most sense and is easy enough to implement - unless there is demand for more complicated ways to freeze columns.

The change only adds a new way to freeze columns, the old way will work identically.

example_frozen_columns.mp4

Copy link

codecov bot commented Feb 6, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (ed34b1c) 71.66% compared to head (f96921e) 83.57%.
Report is 1 commits behind head on main.

Files Patch % Lines
panel/widgets/tables.py 68.75% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #6309       +/-   ##
===========================================
+ Coverage   71.66%   83.57%   +11.90%     
===========================================
  Files         305      305               
  Lines       45440    45463       +23     
===========================================
+ Hits        32565    37996     +5431     
+ Misses      12875     7467     -5408     
Flag Coverage Δ
ui-tests 40.26% <70.58%> (?)
unitexamples-tests 71.64% <32.35%> (-0.03%) ⬇️

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
Member

@philippjfr philippjfr left a comment

Choose a reason for hiding this comment

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

Thanks so much @CTPassion, this is really great! When I first implemented this I did plan to support left and right but didn't follow through. I don't think Tabulator supports frozen columns that are not right or left aligned anyway and the syntax makes sense to me.

@philippjfr philippjfr added this to the v1.4.0 milestone Feb 9, 2024
@philippjfr philippjfr merged commit 723768e into holoviz:main Feb 9, 2024
14 of 15 checks passed
@CTPassion
Copy link
Contributor Author

Thanks so much @CTPassion, this is really great! When I first implemented this I did plan to support left and right but didn't follow through. I don't think Tabulator supports frozen columns that are not right or left aligned anyway and the syntax makes sense to me.

No problem :) Next up would be to freeze groups left or right - but as this wasn't a requirement for me I left it for now.

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.

None yet

3 participants