@centreon/ui 25.10.13 → 25.10.15
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/package.json
CHANGED
|
@@ -340,11 +340,11 @@ const ConnectedAutocompleteField = (
|
|
|
340
340
|
);
|
|
341
341
|
|
|
342
342
|
useEffect(() => {
|
|
343
|
-
if (!autocompleteChangedValue
|
|
343
|
+
if (!autocompleteChangedValue) {
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
346
346
|
setSearchParameter(undefined);
|
|
347
|
-
}, [autocompleteChangedValue
|
|
347
|
+
}, [autocompleteChangedValue]);
|
|
348
348
|
|
|
349
349
|
useEffect(() => {
|
|
350
350
|
if (!optionsOpen) {
|
|
@@ -38,7 +38,8 @@ const ListboxComponent = ({
|
|
|
38
38
|
options,
|
|
39
39
|
isOptionSelected,
|
|
40
40
|
onChange,
|
|
41
|
-
total
|
|
41
|
+
total,
|
|
42
|
+
value = []
|
|
42
43
|
}) => {
|
|
43
44
|
if (disableSelectAll) {
|
|
44
45
|
return;
|
|
@@ -54,12 +55,19 @@ const ListboxComponent = ({
|
|
|
54
55
|
const syntheticEvent = {} as React.SyntheticEvent;
|
|
55
56
|
|
|
56
57
|
if (allSelected) {
|
|
57
|
-
|
|
58
|
+
const remaining = value.filter(
|
|
59
|
+
(v) => !options.some((opt) => opt.id === v.id)
|
|
60
|
+
);
|
|
61
|
+
onChange?.(syntheticEvent, remaining, 'selectOption');
|
|
58
62
|
|
|
59
63
|
return;
|
|
60
64
|
}
|
|
61
65
|
|
|
62
|
-
|
|
66
|
+
const merged = [
|
|
67
|
+
...value,
|
|
68
|
+
...options.filter((opt) => !isOptionSelected(opt))
|
|
69
|
+
];
|
|
70
|
+
onChange?.(syntheticEvent, merged, 'selectOption');
|
|
63
71
|
};
|
|
64
72
|
|
|
65
73
|
return (
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
--color-primary-main: #2e68aa;
|
|
99
99
|
--color-primary-light: #cde7fc;
|
|
100
100
|
--color-primary-dark: #255891;
|
|
101
|
+
--color-primary-contrastText: #fff;
|
|
101
102
|
--color-secondary-main: #c772d6;
|
|
102
103
|
--color-secondary-light: #e5a5f0;
|
|
103
104
|
--color-secondary-dark: #ac28c1;
|
|
@@ -185,6 +186,7 @@
|
|
|
185
186
|
--color-primary-main: #6eaff8;
|
|
186
187
|
--color-primary-light: #8bbff9;
|
|
187
188
|
--color-primary-dark: #4974a5;
|
|
189
|
+
--color-primary-contrastText: #000;
|
|
188
190
|
--color-secondary-main: #7c1fa2;
|
|
189
191
|
--color-status-background-error: #d60101;
|
|
190
192
|
--color-status-background-none: --alpha(#2e68aa / 10%);
|