Skip to content

Commit

Permalink
fix: Config changes - reset page to 1 when filters change
Browse files Browse the repository at this point in the history
Fixes #2007
  • Loading branch information
mainawycliffe authored and moshloop committed Jun 6, 2024
1 parent d6eae7b commit 97e9acb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type ConfigInsightsFiltersProps = {
};

export function ConfigInsightsFilters({
paramsToReset = ["pageIndex", "pageSize"]
paramsToReset = ["pageIndex"]
}: ConfigInsightsFiltersProps) {
return (
<FormikFilterForm
Expand Down
2 changes: 1 addition & 1 deletion src/pages/config/ConfigChangesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export function ConfigChangesPage() {
) : (
<>
<ConfigChangeFilters
paramsToReset={["pageIndex", "pageSize"]}
paramsToReset={["page"]}
arbitraryFilters={arbitraryFilter}
/>
<ConfigChangeHistory
Expand Down
2 changes: 1 addition & 1 deletion src/pages/config/ConfigInsightsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function ConfigInsightsPage() {
>
<ConfigPageTabs activeTab="Insights">
<div className="flex flex-row items-center">
<ConfigInsightsFilters paramsToReset={["pageIndex", "pageSize"]} />
<ConfigInsightsFilters paramsToReset={["pageIndex"]} />
</div>
<div className="flex flex-col h-full overflow-y-hidden">
<ConfigInsightsList
Expand Down
2 changes: 1 addition & 1 deletion src/pages/config/details/ConfigDetailsChangesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export function ConfigDetailsChangesPage() {
>
<div className={`flex flex-col flex-1 h-full overflow-y-auto`}>
<div className="flex flex-col flex-1 items-start gap-2 overflow-y-auto">
<ConfigRelatedChangesFilters />
<ConfigRelatedChangesFilters paramsToReset={["page"]} />
<div className="flex flex-col flex-1 overflow-y-auto">
<ConfigChangeHistory
linkConfig={!hideConfigColumn}
Expand Down

0 comments on commit 97e9acb

Please sign in to comment.