@etsoo/react 1.5.36 → 1.5.39
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/mu/OptionGroup.js
CHANGED
|
@@ -66,12 +66,13 @@ export function OptionGroup(props) {
|
|
|
66
66
|
return (React.createElement(FormControlLabel, { key: value, control: control, value: value, label: label }));
|
|
67
67
|
});
|
|
68
68
|
// Group
|
|
69
|
-
const group = multiple ? (React.createElement(FormGroup, { row: row }, list)) : (React.createElement(RadioGroup, { row: row, name: name, value:
|
|
69
|
+
const group = multiple ? (React.createElement(FormGroup, { row: row }, list)) : (React.createElement(RadioGroup, { row: row, name: name, value: values[0], onChange: (_event, value) => {
|
|
70
70
|
if (firstOptionValue == null)
|
|
71
71
|
return;
|
|
72
72
|
const typeValue = Utils.parseString(value, firstOptionValue);
|
|
73
73
|
if (onValueChange)
|
|
74
74
|
onValueChange(typeValue);
|
|
75
|
+
setValues([typeValue]);
|
|
75
76
|
} }, list));
|
|
76
77
|
// Layout
|
|
77
78
|
return (React.createElement(FormControl, { component: "fieldset", ...rest },
|
|
@@ -18,9 +18,13 @@ export const CommonPageScrollContainer = global;
|
|
|
18
18
|
*/
|
|
19
19
|
export function CommonPage(props) {
|
|
20
20
|
// Destruct
|
|
21
|
-
const { children, disableGutters = true, fabButtons, fabColumnDirection, fabPaddingAdjust = 1.5, fabSize = 'small', maxWidth = false, moreActions, onRefresh, onUpdate, onUpdateAll, paddings = MUGlobal.pagePaddings, scrollContainer, supportBack = false, targetFields, sx = {
|
|
21
|
+
const { children, disableGutters = true, fabButtons, fabColumnDirection, fabPaddingAdjust = 1.5, fabSize = 'small', maxWidth = false, moreActions, onRefresh, onUpdate, onUpdateAll, paddings = MUGlobal.pagePaddings, scrollContainer, supportBack = false, targetFields, sx = {}, ...rest } = props;
|
|
22
22
|
// Fab padding
|
|
23
23
|
const fabPadding = MUGlobal.increase(MUGlobal.pagePaddings, fabPaddingAdjust);
|
|
24
|
+
if (typeof sx === 'object' && sx != null && !Reflect.has(sx, 'padding')) {
|
|
25
|
+
// Set default padding
|
|
26
|
+
Reflect.set(sx, 'padding', paddings);
|
|
27
|
+
}
|
|
24
28
|
// Labels
|
|
25
29
|
const labels = Labels.CommonPage;
|
|
26
30
|
// Update
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.39",
|
|
4
4
|
"description": "TypeScript ReactJs framework",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"@emotion/react": "^11.9.0",
|
|
51
51
|
"@emotion/style": "^0.8.0",
|
|
52
52
|
"@emotion/styled": "^11.8.1",
|
|
53
|
-
"@etsoo/appscript": "^1.2.
|
|
54
|
-
"@etsoo/notificationbase": "^1.1.
|
|
55
|
-
"@etsoo/shared": "^1.1.
|
|
53
|
+
"@etsoo/appscript": "^1.2.61",
|
|
54
|
+
"@etsoo/notificationbase": "^1.1.4",
|
|
55
|
+
"@etsoo/shared": "^1.1.40",
|
|
56
56
|
"@mui/icons-material": "^5.8.0",
|
|
57
57
|
"@mui/material": "^5.8.1",
|
|
58
58
|
"@types/pica": "^9.0.0",
|
package/src/mu/OptionGroup.tsx
CHANGED
|
@@ -194,11 +194,12 @@ export function OptionGroup<
|
|
|
194
194
|
<RadioGroup
|
|
195
195
|
row={row}
|
|
196
196
|
name={name}
|
|
197
|
-
value={
|
|
197
|
+
value={values[0]}
|
|
198
198
|
onChange={(_event, value) => {
|
|
199
199
|
if (firstOptionValue == null) return;
|
|
200
200
|
const typeValue = Utils.parseString<D>(value, firstOptionValue);
|
|
201
201
|
if (onValueChange) onValueChange(typeValue);
|
|
202
|
+
setValues([typeValue]);
|
|
202
203
|
}}
|
|
203
204
|
>
|
|
204
205
|
{list}
|
|
@@ -37,7 +37,7 @@ export function CommonPage(props: CommonPageProps) {
|
|
|
37
37
|
scrollContainer,
|
|
38
38
|
supportBack = false,
|
|
39
39
|
targetFields,
|
|
40
|
-
sx = {
|
|
40
|
+
sx = {},
|
|
41
41
|
...rest
|
|
42
42
|
} = props;
|
|
43
43
|
|
|
@@ -47,6 +47,11 @@ export function CommonPage(props: CommonPageProps) {
|
|
|
47
47
|
fabPaddingAdjust
|
|
48
48
|
);
|
|
49
49
|
|
|
50
|
+
if (typeof sx === 'object' && sx != null && !Reflect.has(sx, 'padding')) {
|
|
51
|
+
// Set default padding
|
|
52
|
+
Reflect.set(sx, 'padding', paddings);
|
|
53
|
+
}
|
|
54
|
+
|
|
50
55
|
// Labels
|
|
51
56
|
const labels = Labels.CommonPage;
|
|
52
57
|
|