Skip to content

Commit

Permalink
[ML] Fix pagination reset on search query update.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed May 7, 2020
1 parent 55e4c7f commit c0ccae5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export const useExplorationResults = (
d => !d.includes(`.${FEATURE_IMPORTANCE}.`) && d !== ML__ID_COPY
);

useEffect(() => {
dataGrid.resetPagination();
}, [JSON.stringify(searchQuery)]);

useEffect(() => {
getIndexData(jobConfig, dataGrid, searchQuery);
// custom comparison
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ export const useOutlierData = (
d => !d.includes(`.${FEATURE_INFLUENCE}.`) && d !== ML__ID_COPY
);

useEffect(() => {
dataGrid.resetPagination();
}, [JSON.stringify(searchQuery)]);

// initialize sorting: reverse sort on outlier score column
useEffect(() => {
if (jobConfig !== undefined) {
Expand Down

0 comments on commit c0ccae5

Please sign in to comment.