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
- var _newValue$map;
158
- var newSelectedOptionsSet = new Set((_newValue$map = newValue === null || newValue === void 0 ? void 0 : newValue.map(function (item) {
159
- return item;
160
- })) !== null && _newValue$map !== void 0 ? _newValue$map : []);
161
- var newSelectedOptions = Array.from(newSelectedOptionsSet).map(function (item) {
162
- return item;
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.392",
3
+ "version": "1.0.393",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {