@etsoo/materialui 1.1.39 → 1.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AuditDisplay.d.ts +5 -5
- package/lib/AuditDisplay.js +17 -19
- package/lib/BridgeCloseButton.d.ts +2 -2
- package/lib/BridgeCloseButton.js +7 -8
- package/lib/DataSteps.d.ts +4 -4
- package/lib/DataSteps.js +17 -14
- package/lib/DataTable.d.ts +33 -0
- package/lib/DataTable.js +56 -0
- package/lib/ListMoreDisplay.d.ts +5 -5
- package/lib/ListMoreDisplay.js +8 -10
- package/lib/OptionBool.js +2 -1
- package/lib/SelectBool.js +2 -1
- package/lib/ShowDataComparison.d.ts +1 -1
- package/lib/ShowDataComparison.js +27 -20
- package/lib/SwitchAnt.d.ts +3 -3
- package/lib/SwitchAnt.js +11 -8
- package/lib/SwitchField.d.ts +45 -0
- package/lib/SwitchField.js +33 -0
- package/lib/Tiplist.js +4 -4
- package/lib/UserAvatar.js +7 -8
- package/lib/app/ReactApp.d.ts +7 -7
- package/lib/app/ReactApp.js +26 -26
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/pages/ViewPage.d.ts +7 -7
- package/lib/pages/ViewPage.js +30 -29
- package/package.json +3 -2
- package/src/AuditDisplay.tsx +92 -99
- package/src/BridgeCloseButton.tsx +48 -50
- package/src/DataSteps.tsx +188 -185
- package/src/DataTable.tsx +124 -0
- package/src/ListMoreDisplay.tsx +184 -188
- package/src/OptionBool.tsx +1 -1
- package/src/SelectBool.tsx +1 -1
- package/src/ShowDataComparison.tsx +88 -76
- package/src/SwitchAnt.tsx +82 -78
- package/src/SwitchField.tsx +133 -0
- package/src/Tiplist.tsx +5 -4
- package/src/UserAvatar.tsx +43 -45
- package/src/app/ReactApp.ts +485 -489
- package/src/index.ts +2 -0
- package/src/pages/ViewPage.tsx +272 -277
package/src/index.ts
CHANGED
|
@@ -41,6 +41,7 @@ export * from "./CustomFabProps";
|
|
|
41
41
|
export * from "./DataGridEx";
|
|
42
42
|
export * from "./DataGridRenderers";
|
|
43
43
|
export * from "./DataSteps";
|
|
44
|
+
export * from "./DataTable";
|
|
44
45
|
export * from "./DialogButton";
|
|
45
46
|
export * from "./DnDList";
|
|
46
47
|
export * from "./DraggablePaperComponent";
|
|
@@ -80,6 +81,7 @@ export * from "./SelectEx";
|
|
|
80
81
|
export * from "./ShowDataComparison";
|
|
81
82
|
export * from "./Switch";
|
|
82
83
|
export * from "./SwitchAnt";
|
|
84
|
+
export * from "./SwitchField";
|
|
83
85
|
export * from "./TabBox";
|
|
84
86
|
export * from "./TableEx";
|
|
85
87
|
export * from "./TextFieldEx";
|
package/src/pages/ViewPage.tsx
CHANGED
|
@@ -1,184 +1,187 @@
|
|
|
1
|
-
import { GridColumnRenderProps, GridDataType } from
|
|
2
|
-
import { DataTypes, Utils } from
|
|
1
|
+
import { GridColumnRenderProps, GridDataType } from "@etsoo/react";
|
|
2
|
+
import { DataTypes, DateUtils, Utils } from "@etsoo/shared";
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from
|
|
10
|
-
import React from
|
|
11
|
-
import { Labels } from
|
|
12
|
-
import { globalApp } from
|
|
13
|
-
import { GridDataFormat } from
|
|
14
|
-
import { MUGlobal } from
|
|
15
|
-
import { PullToRefreshUI } from
|
|
16
|
-
import { CommonPage } from
|
|
17
|
-
import { CommonPageProps } from
|
|
4
|
+
Grid,
|
|
5
|
+
GridProps,
|
|
6
|
+
LinearProgress,
|
|
7
|
+
Stack,
|
|
8
|
+
Typography
|
|
9
|
+
} from "@mui/material";
|
|
10
|
+
import React from "react";
|
|
11
|
+
import { Labels } from "../app/Labels";
|
|
12
|
+
import { globalApp } from "../app/ReactApp";
|
|
13
|
+
import { GridDataFormat } from "../GridDataFormat";
|
|
14
|
+
import { MUGlobal } from "../MUGlobal";
|
|
15
|
+
import { PullToRefreshUI } from "../PullToRefreshUI";
|
|
16
|
+
import { CommonPage } from "./CommonPage";
|
|
17
|
+
import { CommonPageProps } from "./CommonPageProps";
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* View page row width type
|
|
21
21
|
*/
|
|
22
|
-
export type ViewPageRowType = boolean |
|
|
22
|
+
export type ViewPageRowType = boolean | "default" | "small" | object;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* View page display field
|
|
26
26
|
*/
|
|
27
27
|
export interface ViewPageField<T extends object> extends GridProps {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Data field
|
|
30
|
+
*/
|
|
31
|
+
data: (string & keyof T) | ((item: T) => React.ReactNode);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Data type
|
|
35
|
+
*/
|
|
36
|
+
dataType?: GridDataType;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Label field
|
|
40
|
+
*/
|
|
41
|
+
label?: string | (() => React.ReactNode);
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Display as single row
|
|
45
|
+
*/
|
|
46
|
+
singleRow?: ViewPageRowType;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Render props
|
|
50
|
+
*/
|
|
51
|
+
renderProps?: GridColumnRenderProps;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
type ViewPageFieldTypeNarrow<T extends object> =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
| (string & keyof T)
|
|
56
|
+
| [string & keyof T, GridDataType, GridColumnRenderProps?, ViewPageRowType?]
|
|
57
|
+
| ViewPageField<T>;
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* View page field type
|
|
61
61
|
*/
|
|
62
62
|
export type ViewPageFieldType<T extends object> =
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
| ViewPageFieldTypeNarrow<T>
|
|
64
|
+
| ((data: T) => React.ReactNode);
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* View page props
|
|
68
68
|
*/
|
|
69
69
|
export interface ViewPageProps<T extends DataTypes.StringRecord>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
70
|
+
extends Omit<CommonPageProps, "children"> {
|
|
71
|
+
/**
|
|
72
|
+
* Actions
|
|
73
|
+
*/
|
|
74
|
+
actions?:
|
|
75
|
+
| React.ReactNode
|
|
76
|
+
| ((data: T, refresh: () => PromiseLike<void>) => React.ReactNode);
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Children
|
|
80
|
+
*/
|
|
81
|
+
children?:
|
|
82
|
+
| React.ReactNode
|
|
83
|
+
| ((data: T, refresh: () => PromiseLike<void>) => React.ReactNode);
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Fields to display
|
|
87
|
+
*/
|
|
88
|
+
fields: ViewPageFieldType<T>[];
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Load data
|
|
92
|
+
*/
|
|
93
|
+
loadData: () => PromiseLike<T | undefined>;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Pull to refresh data
|
|
97
|
+
*/
|
|
98
|
+
pullToRefresh?: boolean;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Support refresh
|
|
102
|
+
*/
|
|
103
|
+
supportRefresh?: boolean;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Grid container reference
|
|
107
|
+
*/
|
|
108
|
+
gridRef?: React.Ref<HTMLDivElement>;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
function formatItemData(fieldData: unknown): string | undefined {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return
|
|
112
|
+
if (fieldData == null) return undefined;
|
|
113
|
+
if (typeof fieldData === "string") return fieldData;
|
|
114
|
+
if (fieldData instanceof Date)
|
|
115
|
+
return globalApp
|
|
116
|
+
? globalApp.formatDate(fieldData, "d")
|
|
117
|
+
: DateUtils.format(fieldData, "d");
|
|
118
|
+
return `${fieldData}`;
|
|
116
119
|
}
|
|
117
120
|
|
|
118
121
|
function getResp(singleRow: ViewPageRowType) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
122
|
+
return typeof singleRow === "object"
|
|
123
|
+
? singleRow
|
|
124
|
+
: singleRow === "default"
|
|
125
|
+
? { xs: 12, sm: 12, md: 12, lg: 6, xl: 6 }
|
|
126
|
+
: singleRow === true
|
|
127
|
+
? { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }
|
|
128
|
+
: {
|
|
129
|
+
xs: singleRow === false ? 12 : 6,
|
|
130
|
+
sm: 6,
|
|
131
|
+
md: 6,
|
|
132
|
+
lg: 4,
|
|
133
|
+
xl: 3
|
|
134
|
+
};
|
|
132
135
|
}
|
|
133
136
|
|
|
134
137
|
function getItemField<T extends object>(
|
|
135
|
-
|
|
136
|
-
|
|
138
|
+
field: ViewPageFieldTypeNarrow<T>,
|
|
139
|
+
data: T
|
|
137
140
|
): [React.ReactNode, React.ReactNode, GridProps] {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
141
|
+
// Item data and label
|
|
142
|
+
let itemData: React.ReactNode,
|
|
143
|
+
itemLabel: React.ReactNode,
|
|
144
|
+
gridProps: GridProps = {};
|
|
145
|
+
|
|
146
|
+
if (Array.isArray(field)) {
|
|
147
|
+
const [fieldData, fieldType, renderProps, singleRow = "small"] = field;
|
|
148
|
+
itemData = GridDataFormat(data[fieldData], fieldType, renderProps);
|
|
149
|
+
itemLabel = globalApp?.get<string>(fieldData) ?? fieldData;
|
|
150
|
+
gridProps = { ...getResp(singleRow) };
|
|
151
|
+
} else if (typeof field === "object") {
|
|
152
|
+
// Destruct
|
|
153
|
+
const {
|
|
154
|
+
data: fieldData,
|
|
155
|
+
dataType,
|
|
156
|
+
label: fieldLabel,
|
|
157
|
+
renderProps,
|
|
158
|
+
singleRow = "default",
|
|
159
|
+
...rest
|
|
160
|
+
} = field;
|
|
161
|
+
|
|
162
|
+
gridProps = {
|
|
163
|
+
...rest,
|
|
164
|
+
...getResp(singleRow)
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
// Field data
|
|
168
|
+
if (typeof fieldData === "function") itemData = fieldData(data);
|
|
169
|
+
else if (dataType == null) itemData = formatItemData(data[fieldData]);
|
|
170
|
+
else itemData = GridDataFormat(data[fieldData], dataType, renderProps);
|
|
171
|
+
|
|
172
|
+
// Field label
|
|
173
|
+
itemLabel =
|
|
174
|
+
typeof fieldLabel === "function"
|
|
175
|
+
? fieldLabel()
|
|
176
|
+
: fieldLabel != null
|
|
177
|
+
? globalApp?.get<string>(fieldLabel) ?? fieldLabel
|
|
178
|
+
: fieldLabel;
|
|
179
|
+
} else {
|
|
180
|
+
itemData = formatItemData(data[field]);
|
|
181
|
+
itemLabel = globalApp?.get<string>(field) ?? field;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return [itemData, itemLabel, gridProps];
|
|
182
185
|
}
|
|
183
186
|
|
|
184
187
|
/**
|
|
@@ -186,134 +189,126 @@ function getItemField<T extends object>(
|
|
|
186
189
|
* @param props Props
|
|
187
190
|
*/
|
|
188
191
|
export function ViewPage<T extends DataTypes.StringRecord>(
|
|
189
|
-
|
|
192
|
+
props: ViewPageProps<T>
|
|
190
193
|
) {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
return !container?.scrollTop;
|
|
312
|
-
}}
|
|
313
|
-
/>
|
|
314
|
-
)}
|
|
315
|
-
</React.Fragment>
|
|
316
|
-
)}
|
|
317
|
-
</CommonPage>
|
|
318
|
-
);
|
|
194
|
+
// Destruct
|
|
195
|
+
const {
|
|
196
|
+
actions,
|
|
197
|
+
children,
|
|
198
|
+
fields,
|
|
199
|
+
loadData,
|
|
200
|
+
paddings = MUGlobal.pagePaddings,
|
|
201
|
+
supportRefresh = true,
|
|
202
|
+
fabColumnDirection = true,
|
|
203
|
+
supportBack = true,
|
|
204
|
+
pullToRefresh = true,
|
|
205
|
+
gridRef,
|
|
206
|
+
...rest
|
|
207
|
+
} = props;
|
|
208
|
+
|
|
209
|
+
// Data
|
|
210
|
+
const [data, setData] = React.useState<T>();
|
|
211
|
+
|
|
212
|
+
// Labels
|
|
213
|
+
const labels = Labels.CommonPage;
|
|
214
|
+
|
|
215
|
+
// Container
|
|
216
|
+
const pullContainer = "#page-container";
|
|
217
|
+
|
|
218
|
+
// Load data
|
|
219
|
+
const refresh = async () => {
|
|
220
|
+
const result = await loadData();
|
|
221
|
+
if (result == null) return;
|
|
222
|
+
setData(result);
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
return (
|
|
226
|
+
<CommonPage
|
|
227
|
+
paddings={paddings}
|
|
228
|
+
onRefresh={supportRefresh ? refresh : undefined}
|
|
229
|
+
onUpdate={supportRefresh ? undefined : refresh}
|
|
230
|
+
{...rest}
|
|
231
|
+
scrollContainer={globalThis}
|
|
232
|
+
fabColumnDirection={fabColumnDirection}
|
|
233
|
+
supportBack={supportBack}
|
|
234
|
+
>
|
|
235
|
+
{data == null ? (
|
|
236
|
+
<LinearProgress />
|
|
237
|
+
) : (
|
|
238
|
+
<React.Fragment>
|
|
239
|
+
<Grid
|
|
240
|
+
container
|
|
241
|
+
justifyContent="left"
|
|
242
|
+
spacing={paddings}
|
|
243
|
+
className="ET-ViewPage"
|
|
244
|
+
ref={gridRef}
|
|
245
|
+
sx={{
|
|
246
|
+
".MuiTypography-subtitle2": {
|
|
247
|
+
fontWeight: "bold"
|
|
248
|
+
}
|
|
249
|
+
}}
|
|
250
|
+
>
|
|
251
|
+
{fields.map((field, index) => {
|
|
252
|
+
// Get data
|
|
253
|
+
if (typeof field === "function") {
|
|
254
|
+
// Most flexible way, do whatever you want
|
|
255
|
+
return field(data);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const [itemData, itemLabel, gridProps] = getItemField(
|
|
259
|
+
field,
|
|
260
|
+
data
|
|
261
|
+
);
|
|
262
|
+
|
|
263
|
+
// Some callback function may return '' instead of undefined
|
|
264
|
+
if (itemData == null || itemData === "") return undefined;
|
|
265
|
+
|
|
266
|
+
// Layout
|
|
267
|
+
return (
|
|
268
|
+
<Grid item {...gridProps} key={index}>
|
|
269
|
+
{itemLabel != null && (
|
|
270
|
+
<Typography variant="caption" component="div">
|
|
271
|
+
{itemLabel}:
|
|
272
|
+
</Typography>
|
|
273
|
+
)}
|
|
274
|
+
{typeof itemData === "object" ? (
|
|
275
|
+
itemData
|
|
276
|
+
) : (
|
|
277
|
+
<Typography variant="subtitle2">{itemData}</Typography>
|
|
278
|
+
)}
|
|
279
|
+
</Grid>
|
|
280
|
+
);
|
|
281
|
+
})}
|
|
282
|
+
</Grid>
|
|
283
|
+
<Stack
|
|
284
|
+
className="ET-ViewPage-Actions"
|
|
285
|
+
direction="row"
|
|
286
|
+
width="100%"
|
|
287
|
+
flexWrap="wrap"
|
|
288
|
+
justifyContent="flex-end"
|
|
289
|
+
paddingTop={actions == null ? undefined : paddings}
|
|
290
|
+
paddingBottom={paddings}
|
|
291
|
+
gap={paddings}
|
|
292
|
+
>
|
|
293
|
+
{actions != null && Utils.getResult(actions, data, refresh)}
|
|
294
|
+
</Stack>
|
|
295
|
+
{Utils.getResult(children, data, refresh)}
|
|
296
|
+
{pullToRefresh && (
|
|
297
|
+
<PullToRefreshUI
|
|
298
|
+
mainElement={pullContainer}
|
|
299
|
+
triggerElement={pullContainer}
|
|
300
|
+
instructionsPullToRefresh={labels.pullToRefresh}
|
|
301
|
+
instructionsReleaseToRefresh={labels.releaseToRefresh}
|
|
302
|
+
instructionsRefreshing={labels.refreshing}
|
|
303
|
+
onRefresh={refresh}
|
|
304
|
+
shouldPullToRefresh={() => {
|
|
305
|
+
const container = document.querySelector(pullContainer);
|
|
306
|
+
return !container?.scrollTop;
|
|
307
|
+
}}
|
|
308
|
+
/>
|
|
309
|
+
)}
|
|
310
|
+
</React.Fragment>
|
|
311
|
+
)}
|
|
312
|
+
</CommonPage>
|
|
313
|
+
);
|
|
319
314
|
}
|