|
| 1 | +import { useOnResetFiltersEvent } from "@mendix/widget-plugin-external-events/hooks"; |
| 2 | +import { useClickActionHelper } from "@mendix/widget-plugin-grid/helpers/ClickActionHelper"; |
| 3 | +import { useFocusTargetController } from "@mendix/widget-plugin-grid/keyboard-navigation/useFocusTargetController"; |
1 | 4 | import { useSelectionHelper } from "@mendix/widget-plugin-grid/selection"; |
2 | 5 | import { generateUUID } from "@mendix/widget-plugin-platform/framework/generate-uuid"; |
| 6 | +import { observer } from "mobx-react-lite"; |
3 | 7 | import { ReactElement, ReactNode, createElement, useCallback, useMemo } from "react"; |
4 | 8 | import { DatagridContainerProps } from "../typings/DatagridProps"; |
5 | 9 | import { Cell } from "./components/Cell"; |
6 | 10 | import { Widget } from "./components/Widget"; |
7 | 11 | import { WidgetHeaderContext } from "./components/WidgetHeaderContext"; |
8 | | -import { useSelectActionHelper } from "./helpers/SelectActionHelper"; |
9 | | -import { useClickActionHelper } from "@mendix/widget-plugin-grid/helpers/ClickActionHelper"; |
| 12 | +import { ProgressStore } from "./features/data-export/ProgressStore"; |
| 13 | +import { useDataExport } from "./features/data-export/useDataExport"; |
10 | 14 | import { useCellEventsController } from "./features/row-interaction/CellEventsController"; |
11 | 15 | import { useCheckboxEventsController } from "./features/row-interaction/CheckboxEventsController"; |
12 | | -import { useFocusTargetController } from "@mendix/widget-plugin-grid/keyboard-navigation/useFocusTargetController"; |
13 | | -import { useOnResetFiltersEvent } from "@mendix/widget-plugin-external-events/hooks"; |
| 16 | +import { useSelectActionHelper } from "./helpers/SelectActionHelper"; |
14 | 17 | import { IColumnGroupStore } from "./helpers/state/ColumnGroupStore"; |
15 | | -import { observer } from "mobx-react-lite"; |
16 | 18 | import { RootGridStore } from "./helpers/state/RootGridStore"; |
17 | 19 | import { useRootStore } from "./helpers/state/useRootStore"; |
18 | | -import { useDataExport } from "./features/data-export/useDataExport"; |
19 | | -import { ProgressStore } from "./features/data-export/ProgressStore"; |
20 | 20 |
|
21 | 21 | interface Props extends DatagridContainerProps { |
22 | 22 | columnsStore: IColumnGroupStore; |
@@ -118,10 +118,12 @@ const Container = observer((props: Props): ReactElement => { |
118 | 118 | cellEventsController={cellEventsController} |
119 | 119 | checkboxEventsController={checkboxEventsController} |
120 | 120 | focusController={focusController} |
121 | | - isLoading={rootStore.loaderCtrl.isLoading} |
| 121 | + isFirstLoad={rootStore.loaderCtrl.isFirstLoad} |
122 | 122 | isFetchingNextBatch={rootStore.loaderCtrl.isFetchingNextBatch} |
| 123 | + isLoading={props.datasource.status === "loading"} |
123 | 124 | loadingType={props.loadingType} |
124 | 125 | columnsLoading={!columnsStore.loaded} |
| 126 | + showRefreshIndicator={rootStore.loaderCtrl.showRefreshIndicator} |
125 | 127 | /> |
126 | 128 | ); |
127 | 129 | }); |
|
0 commit comments