vmware-clarity / ng-clarity

Clarity Angular is a scalable, accessible, customizable, open-source design system built for Angular.

Home Page:https://clarity.design

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data grid Hide/Show Columns - get list of hidden/ visible columns

ietabhi opened this issue · comments

Describe the bug

Hide/Show Columns - I am looking same feature as we had in angular 13 where i can get list of current hidden column and want to capture event when i will click on hide/ show/ select all

Current behavior - I will save preferences for user in my database, once user revisit he should not see hidden column he choose previously.

How to reproduce

git-hide-show-column

Steps to reproduce the behavior:

https://stackblitz.com/edit/clarity-light-theme-clr15-po1krs

No way to capture click event

Expected behavior

I should be able to capture events when i click on popover for show/hide column

Versions

Clarity version:

v15.x

Framework version:
Angular 15

Device:

  • Type: Windows Laptop
  • OS: Windows 11
  • Browser chrome
  • Version latest

Additional notes

NA

I should be able to capture events when i click on popover for show/hide column

We do not expose events for the manage columns popover. However, there is an event when a column's visibility is changed: clrDgHiddenChange.

Example: https://stackblitz.com/edit/clarity-light-theme-clr15-2n6vfr?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.html

Using the clrDgHiddenChange event (or the [(clrDgHidden)] two-way binding), you can track which columns are shown. If you need to know when all columns are shown, this way is likely better than the clrAllSelected event that you used to be able to use because you can react the same whether user clicked the "Select All" button or manually selected each column.

This is will be helpful, thanks for the guidance

Great! I'm going to close this issue, but if you have any further questions, just comment. Thanks!

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.