File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,8 +13,10 @@ import {
1313 resetFilterValues ,
1414} from "../../slices/tableFilterSlice" ;
1515import {
16- goToPage ,
17- } from "../../thunks/tableThunks" ;
16+ deselectAll ,
17+ setOffset ,
18+ setPageActive ,
19+ } from "../../slices/tableSlice" ;
1820import TableFilterProfiles from "./TableFilterProfiles" ;
1921import { availableHotkeys } from "../../configs/hotkeysConfig" ;
2022import { useHotkeys } from "react-hotkeys-hook" ;
@@ -136,7 +138,9 @@ const TableFilters = ({
136138 // This helps increase performance by reducing the number of calls to load resources.
137139 const applyFilterChangesDebounced = async ( ) => {
138140 // No matter what, we go to page one.
139- dispatch ( goToPage ( 0 ) ) ;
141+ dispatch ( deselectAll ( ) ) ;
142+ dispatch ( setOffset ( 0 ) ) ;
143+ dispatch ( setPageActive ( 1 ) ) ;
140144 // Reload of resource
141145 await loadResource ( ) ;
142146 } ;
@@ -201,7 +205,9 @@ const TableFilters = ({
201205 setFilterSelector ( false ) ;
202206 setSelectedFilter ( "" ) ;
203207 // Reload of resource after going to very first page.
204- dispatch ( goToPage ( 0 ) ) ;
208+ dispatch ( deselectAll ( ) ) ;
209+ dispatch ( setOffset ( 0 ) ) ;
210+ dispatch ( setPageActive ( 1 ) ) ;
205211 await loadResource ( ) ;
206212 }
207213 }
You can’t perform that action at this time.
0 commit comments