Skip to content

fix: preserve columnVisibility from initialState#19412

Merged
eunjae-lee merged 1 commit intomainfrom
fix/initial-state-column-visibility
Feb 21, 2025
Merged

fix: preserve columnVisibility from initialState#19412
eunjae-lee merged 1 commit intomainfrom
fix/initial-state-column-visibility

Conversation

@eunjae-lee
Copy link
Copy Markdown
Contributor

@eunjae-lee eunjae-lee commented Feb 20, 2025

What does this PR do?

This PR preserves columnVisibility from initialState.

initialState.columnVisibility is only used until table.setOptions({ ... , columnVisibility }) is called.
Afterwards, column.getIsVisible() refers to only table.options.state.

So, in this PR, I merge the two, because sometimes we want to keep certain columns hidden.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A - I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

At /insights/routing, the first two columns should've been hidden. (Routing Forms, User)

This is the screenshot of the current prod version. They should be hidden in this branch.

Screenshot 2025-02-20 at 15 41 41

@keithwillcode keithwillcode added consumer core area: core, team members only labels Feb 20, 2025
@eunjae-lee eunjae-lee marked this pull request as ready for review February 20, 2025 14:43
@graphite-app graphite-app Bot requested a review from a team February 20, 2025 14:44
@dosubot dosubot Bot added the 🐛 bug Something isn't working label Feb 20, 2025
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Feb 20, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (02/20/25)

1 reviewer was added to this PR based on Keith Williams's automation.

@github-actions
Copy link
Copy Markdown
Contributor

E2E results are ready!

@eunjae-lee eunjae-lee merged commit 0b3aa4f into main Feb 21, 2025
@eunjae-lee eunjae-lee deleted the fix/initial-state-column-visibility branch February 21, 2025 07:56
itsalam pushed a commit to itsalam/cal.com that referenced this pull request Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working consumer core area: core, team members only ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants