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

Prevent sort reset on data change #3290

Merged
merged 10 commits into from
Aug 15, 2023

Conversation

TheAndrewJackson
Copy link
Contributor

@TheAndrewJackson TheAndrewJackson commented May 11, 2023

Closes #3246

Code Changes

  • Update react table config to not automatically reset sorts when data updates
  • Add test for this update

Steps to Confirm

  • Run fidesplus and the admin ui
  • Add a few custom fields
  • Apply a column sort
  • enable/disable a field
  • ensure the sort is saved

Pre-Merge Checklist

Description Of Changes

I thought I was going to need to cache the sort objects but it turns out the desired behavior is a config option 🤷‍♂️

https://react-table-v7.tanstack.com/docs/faq#how-do-i-stop-my-table-state-from-automatically-resetting-when-my-data-changes

keep.sort.on.PATCH.mov

@TheAndrewJackson TheAndrewJackson self-assigned this May 11, 2023
@cypress
Copy link

cypress bot commented May 11, 2023

Passing run #3554 ↗︎

0 4 0 0 Flakiness 0

Details:

Merge 5ec9ef9 into ba1847e...
Project: fides Commit: fb51c30fe2 ℹ️
Status: Passed Duration: 01:13 💡
Started: Aug 15, 2023 1:17 AM Ended: Aug 15, 2023 1:18 AM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@TheAndrewJackson TheAndrewJackson marked this pull request as ready for review May 11, 2023 19:28
Copy link
Contributor

@allisonking allisonking left a comment

Choose a reason for hiding this comment

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

nice!

clients/admin-ui/cypress/e2e/custom-fields.cy.ts Outdated Show resolved Hide resolved
@TheAndrewJackson TheAndrewJackson merged commit 52d5b3f into main Aug 15, 2023
9 checks passed
@TheAndrewJackson TheAndrewJackson deleted the prevent_sort_reset_on_data_change branch August 15, 2023 17:43
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.

Cache FidesTable column sorts
2 participants