gregnb / gregnb/mui-datatables

onViewColumnsChange function

Open
#1,651 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

Hello,

I hope you are doing well!

We have an issue with the onViewColumnsChange (previously onColumnViewChange) function, when we click on the checkbox to display or hide a column.
The event has already been done (the column is displayed or hidden in the table). Indeed, the event parameter is add or remove depending on the action and the column has already been set in a way to display/hide before we
modify the display property in column options.

Each time we check/uncheck a column, we would like to do a call to the backend, wait for the data and then display the column with the data.

Is there a way to handle the add/remove action before the onViewColumnsChange ? Is there a function do to that ? We saw nothing on the documentation related to our issue.

Thank you for your help

Have a good day.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the onViewColumnsChange and previous onColumnViewChange entry points, then inspect how column visibility is applied before the callback runs. The issue does not name files or tests; done would require a supported way to handle the add/remove action before data is displayed, with coverage or documentation for that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.