sag_components 1.0.392 → 1.0.393
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.
|
@@ -154,13 +154,17 @@ var DropdownMulti = exports.DropdownMulti = function DropdownMulti(_ref) {
|
|
|
154
154
|
});
|
|
155
155
|
};
|
|
156
156
|
var onChangeHandler = function onChangeHandler(event, newValue) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
})
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
// const newSelectedOptionsSet = new Set(newValue?.map((item) => item) ?? []);
|
|
158
|
+
// const newSelectedOptions = Array.from(newSelectedOptionsSet).map((item) => {
|
|
159
|
+
// return item;
|
|
160
|
+
// });
|
|
161
|
+
|
|
162
|
+
var newSelectedOptions = newValue === null || newValue === void 0 ? void 0 : newValue.filter(function (value, index, self) {
|
|
163
|
+
return index === self.findIndex(function (item) {
|
|
164
|
+
return item.id === value.id && item.label === value.label;
|
|
165
|
+
});
|
|
163
166
|
});
|
|
167
|
+
console.log("onChangeHandler", newSelectedOptions);
|
|
164
168
|
setSelectedOptionsState(newSelectedOptions);
|
|
165
169
|
onChange({
|
|
166
170
|
syntheticBaseEvent: event,
|