@gravity-ui/dynamic-forms 4.2.0 → 4.3.0
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.
|
@@ -9,9 +9,12 @@
|
|
|
9
9
|
.df-use-oneof__card {
|
|
10
10
|
display: flex;
|
|
11
11
|
}
|
|
12
|
-
.df-use-oneof__card >
|
|
12
|
+
.df-use-oneof__card > * {
|
|
13
13
|
margin-right: 8px;
|
|
14
14
|
}
|
|
15
|
+
.df-use-oneof__card > :last-child {
|
|
16
|
+
margin-right: 0;
|
|
17
|
+
}
|
|
15
18
|
.df-use-oneof__checkbox {
|
|
16
19
|
height: 28px;
|
|
17
20
|
display: flex;
|
|
@@ -60,7 +60,7 @@ const useOneOf = ({ props, onTogglerChange }) => {
|
|
|
60
60
|
}), [spec.description, spec.viewSpec.order, specProperties]);
|
|
61
61
|
const togglerType = react_1.default.useMemo(() => {
|
|
62
62
|
var _a, _b, _c, _d;
|
|
63
|
-
if (((_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.toggler) === 'card' && options.length <
|
|
63
|
+
if (((_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.toggler) === 'card' && options.length < 4) {
|
|
64
64
|
return 'card';
|
|
65
65
|
}
|
|
66
66
|
if (((_b = spec.viewSpec.oneOfParams) === null || _b === void 0 ? void 0 : _b.toggler) !== 'radio' &&
|
|
@@ -9,9 +9,12 @@
|
|
|
9
9
|
.df-use-oneof__card {
|
|
10
10
|
display: flex;
|
|
11
11
|
}
|
|
12
|
-
.df-use-oneof__card >
|
|
12
|
+
.df-use-oneof__card > * {
|
|
13
13
|
margin-right: 8px;
|
|
14
14
|
}
|
|
15
|
+
.df-use-oneof__card > :last-child {
|
|
16
|
+
margin-right: 0;
|
|
17
|
+
}
|
|
15
18
|
.df-use-oneof__checkbox {
|
|
16
19
|
height: 28px;
|
|
17
20
|
display: flex;
|
|
@@ -57,7 +57,7 @@ export const useOneOf = ({ props, onTogglerChange }) => {
|
|
|
57
57
|
}), [spec.description, spec.viewSpec.order, specProperties]);
|
|
58
58
|
const togglerType = React.useMemo(() => {
|
|
59
59
|
var _a, _b, _c, _d;
|
|
60
|
-
if (((_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.toggler) === 'card' && options.length <
|
|
60
|
+
if (((_a = spec.viewSpec.oneOfParams) === null || _a === void 0 ? void 0 : _a.toggler) === 'card' && options.length < 4) {
|
|
61
61
|
return 'card';
|
|
62
62
|
}
|
|
63
63
|
if (((_b = spec.viewSpec.oneOfParams) === null || _b === void 0 ? void 0 : _b.toggler) !== 'radio' &&
|