Skip to content

Add a dropdown to display/hide columns in Datatable #1118

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

Merged
merged 4 commits into from
Apr 25, 2025

Conversation

BenjaminCharmes
Copy link
Contributor

@BenjaminCharmes BenjaminCharmes commented Apr 11, 2025

Closes #1117

Copy link

codecov bot commented Apr 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.35%. Comparing base (1419429) to head (0fe2157).
Report is 92 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1118   +/-   ##
=======================================
  Coverage   71.35%   71.35%           
=======================================
  Files          63       63           
  Lines        4151     4151           
=======================================
  Hits         2962     2962           
  Misses       1189     1189           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

cypress bot commented Apr 11, 2025

datalab    Run #3193

Run Properties:  status check passed Passed #3193  •  git commit 0d11e52e8e ℹ️: Merge 0fe215712eb5fd6bade99a18901b23da7c4406c5 into 1419429b68fce60ac243c0bd46e8...
Project datalab
Branch Review bc/datatable-improvement
Run status status check passed Passed #3193
Run duration 06m 32s
Commit git commit 0d11e52e8e ℹ️: Merge 0fe215712eb5fd6bade99a18901b23da7c4406c5 into 1419429b68fce60ac243c0bd46e8...
Committer Ben Charmes
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 166
View all changes introduced in this branch ↗︎

@ml-evs ml-evs force-pushed the bc/datatable-improvement branch from 9120bc4 to 2d649e1 Compare April 12, 2025 15:11
@ml-evs ml-evs force-pushed the bc/datatable-improvement branch 2 times, most recently from 26c8eb7 to 54ea566 Compare April 23, 2025 20:49
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

Looks really nice to me @BenjaminCharmes! Anything else you want to add before merging? I'm also wondering if we should always force the ID/type column to be there

@ml-evs ml-evs force-pushed the bc/datatable-improvement branch from 54ea566 to 7d6dc1f Compare April 23, 2025 22:13
@BenjaminCharmes
Copy link
Contributor Author

Looks really nice to me @BenjaminCharmes! Anything else you want to add before merging? I'm also wondering if we should always force the ID/type column to be there

From my side, it's ready to merge!
For the ID/Type columns it's up to you, i don't mind. Perhaps @jdbocarsly has an opinion ?

@ml-evs ml-evs marked this pull request as ready for review April 24, 2025 09:14
@ml-evs ml-evs requested a review from jdbocarsly as a code owner April 24, 2025 09:14
BenjaminCharmes and others added 2 commits April 24, 2025 16:38
@ml-evs ml-evs force-pushed the bc/datatable-improvement branch from 988badc to 777cfdf Compare April 24, 2025 15:38
Remove unused template

Remove unused template

Remove unused template
@BenjaminCharmes BenjaminCharmes force-pushed the bc/datatable-improvement branch from e27182b to 0fe2157 Compare April 25, 2025 10:45
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @BenjaminCharmes!

Comment on lines +77 to +82
.p-multiselect-header .p-checkbox::after {
content: 'Select all';
position: absolute;
left: 28px;
width: 110px;
}
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately this was the only way I found of doing it too! We might think about using rem rather than px to be slightly more transferable here, but it looks fine at all resolutions I try it at (presumably primevue has some hardcoded pixel values too)

@ml-evs ml-evs merged commit e3e39b9 into main Apr 25, 2025
23 of 24 checks passed
@ml-evs ml-evs deleted the bc/datatable-improvement branch April 25, 2025 12:26
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.

Want to be able to filter which columns are shown
2 participants