fix: don't add project flag table state config to browser history #6824
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change specifies the update type as
replace
for theuseQueryParams
hook used to set table state.Primarily, this prevents the column selection from being added to the browser
history and more importantly prevents you from changing your config by
navigating through browser history.
However, this also affects other table state, such as changing sorting order etc. These will also no longer be added to the browser history.
Bug description:
In the project flag table, you can select which env columns to show. However, adding and removing these envs get added as steps in your browser history. This means that if you add 3 envs, you:
Steps to reproduce: