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

hidden prop on columns doesn't work #627

Closed
KuriatoV opened this issue Aug 8, 2024 · 0 comments
Closed

hidden prop on columns doesn't work #627

KuriatoV opened this issue Aug 8, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@KuriatoV
Copy link

KuriatoV commented Aug 8, 2024

Seems like prop "hidden" on column doesn't affect the column and depends only on "toggled" prop, this caused by this code in
useDataTableColumns.ts

 const result = columnsOrder
      .map((order) => columns.find((column) => column.accessor === order))
      .map((column) => {
        return {
          ...column,
          hidden: !columnsToggle.find((toggle) => {          // here 
            return toggle.accessor === column?.accessor;
          })?.toggled,
        };
      }) as DataTableColumn<T>[];
      ```
      
@icflorescu icflorescu added the good first issue Good for newcomers label Sep 4, 2024
icflorescu added a commit that referenced this issue Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants