@etsoo/materialui 1.2.8 → 1.2.10
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/pages/ViewPage.d.ts
CHANGED
package/lib/pages/ViewPage.js
CHANGED
|
@@ -77,7 +77,7 @@ function getItemField(field, data) {
|
|
|
77
77
|
*/
|
|
78
78
|
export function ViewPage(props) {
|
|
79
79
|
// Destruct
|
|
80
|
-
const { actions, children, fields, loadData, paddings = MUGlobal.pagePaddings, supportRefresh = true, fabColumnDirection = true, fabTop = true, supportBack = true, pullToRefresh = true, gridRef, ...rest } = props;
|
|
80
|
+
const { actions, children, fields, loadData, paddings = MUGlobal.pagePaddings, spacing = MUGlobal.half(MUGlobal.pagePaddings), supportRefresh = true, fabColumnDirection = true, fabTop = true, supportBack = true, pullToRefresh = true, gridRef, ...rest } = props;
|
|
81
81
|
// Data
|
|
82
82
|
const [data, setData] = React.useState();
|
|
83
83
|
// Labels
|
|
@@ -92,7 +92,7 @@ export function ViewPage(props) {
|
|
|
92
92
|
setData(result);
|
|
93
93
|
};
|
|
94
94
|
return (React.createElement(CommonPage, { paddings: paddings, onRefresh: supportRefresh ? refresh : undefined, onUpdate: supportRefresh ? undefined : refresh, ...rest, scrollContainer: globalThis, fabColumnDirection: fabColumnDirection, fabTop: fabTop, supportBack: supportBack }, data == null ? (React.createElement(LinearProgress, null)) : (React.createElement(React.Fragment, null,
|
|
95
|
-
React.createElement(Grid, { container: true, justifyContent: "left", spacing:
|
|
95
|
+
React.createElement(Grid, { container: true, justifyContent: "left", spacing: spacing, className: "ET-ViewPage", ref: gridRef, sx: {
|
|
96
96
|
".MuiTypography-subtitle2": {
|
|
97
97
|
fontWeight: "bold"
|
|
98
98
|
}
|
package/package.json
CHANGED
package/src/pages/ViewPage.tsx
CHANGED
|
@@ -97,6 +97,11 @@ export interface ViewPageProps<T extends DataTypes.StringRecord>
|
|
|
97
97
|
*/
|
|
98
98
|
pullToRefresh?: boolean;
|
|
99
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Grid spacing
|
|
102
|
+
*/
|
|
103
|
+
spacing?: Record<string, string | number>;
|
|
104
|
+
|
|
100
105
|
/**
|
|
101
106
|
* Support refresh
|
|
102
107
|
*/
|
|
@@ -198,6 +203,7 @@ export function ViewPage<T extends DataTypes.StringRecord>(
|
|
|
198
203
|
fields,
|
|
199
204
|
loadData,
|
|
200
205
|
paddings = MUGlobal.pagePaddings,
|
|
206
|
+
spacing = MUGlobal.half(MUGlobal.pagePaddings),
|
|
201
207
|
supportRefresh = true,
|
|
202
208
|
fabColumnDirection = true,
|
|
203
209
|
fabTop = true,
|
|
@@ -241,7 +247,7 @@ export function ViewPage<T extends DataTypes.StringRecord>(
|
|
|
241
247
|
<Grid
|
|
242
248
|
container
|
|
243
249
|
justifyContent="left"
|
|
244
|
-
spacing={
|
|
250
|
+
spacing={spacing}
|
|
245
251
|
className="ET-ViewPage"
|
|
246
252
|
ref={gridRef}
|
|
247
253
|
sx={{
|