Skip to content

Commit 341a5e7

Browse files
authored
Enable row counter spinner when switching of root network (#3408)
Signed-off-by: Hugo Marcellin <[email protected]>
1 parent 639377f commit 341a5e7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/spreadsheet-view/spreadsheet/spreadsheet-toolbar/row-counter/use-filtered-row-counter.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export function useFilteredRowCounterInfo({
4141
const [isAnyFilterPresent, setIsAnyFilterPresent] = useState(false);
4242

4343
const currentNode = useSelector((state: AppState) => state.currentTreeNode);
44+
const currentRootNetworkUuid = useSelector((state: AppState) => state.currentRootNetworkUuid);
45+
4446
const globalFilterSpreadsheetState = useSelector(
4547
(state: AppState) => state.globalFilterSpreadsheetState[tableDefinition.uuid]
4648
);
@@ -66,6 +68,10 @@ export function useFilteredRowCounterInfo({
6668
[gridRef, currentNode, disabled]
6769
);
6870

71+
useEffect(() => {
72+
setIsLoading(true);
73+
}, [currentRootNetworkUuid]);
74+
6975
const onFilterChanged = useCallback((event: FilterChangedEvent) => {
7076
setIsAnyFilterPresent(event.api.isAnyFilterPresent());
7177
setIsLoading(true);

0 commit comments

Comments
 (0)