Skip to content

Commit

Permalink
fix: adjust count promise when it must be refreshed
Browse files Browse the repository at this point in the history
  • Loading branch information
mguellsegarra committed Oct 9, 2024
1 parent 28552fc commit 9bc0096
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/widgets/base/one2many/One2manyTopBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import ButtonWithTooltip from "@/common/ButtonWithTooltip";

import {
Expand Down
3 changes: 3 additions & 0 deletions src/widgets/views/SearchTreeInfinite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ function SearchTreeInfiniteComp(props: SearchTreeInfiniteProps, ref: any) {

useImperativeHandle(ref, () => ({
refreshResults: () => {
currentSearchParamsString.current = undefined;
tableRef?.current?.refresh();
},
getFields: () => treeView?.fields,
Expand Down Expand Up @@ -137,6 +138,7 @@ function SearchTreeInfiniteComp(props: SearchTreeInfiniteProps, ref: any) {
setSearchParams?.([]);
setSearchValues?.({});
tableRef.current?.unselectAll();
currentSearchParamsString.current = undefined;
tableRef.current?.refresh();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [nameSearch]);
Expand Down Expand Up @@ -487,6 +489,7 @@ function SearchTreeInfiniteComp(props: SearchTreeInfiniteProps, ref: any) {
prevSearchVisibleRef.current && !searchVisible;

if (searchParamsChanged && searchVisibleChangedToFalse) {
currentSearchParamsString.current = undefined;
tableRef.current?.refresh();
}

Expand Down

0 comments on commit 9bc0096

Please sign in to comment.