@oliasoft-open-source/react-ui-library 3.9.2-beta-2 → 3.9.2-beta-4

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/dist/index.js CHANGED
@@ -27104,8 +27104,11 @@ const CustomSelect = ({
27104
27104
  onCreate(option2.value);
27105
27105
  } else {
27106
27106
  if (!option2.disabled) {
27107
- if (selectedOptions instanceof Array) {
27108
- if (selectedOptions.indexOf(option2) === -1) {
27107
+ if (Array.isArray(selectedOptions)) {
27108
+ const alreadySelected = selectedOptions.find(
27109
+ (selectedOption) => lodash.exports.isEqual(selectedOption, option2)
27110
+ );
27111
+ if (!alreadySelected) {
27109
27112
  const newSelectedOptions = lodash.exports.uniqWith(
27110
27113
  selectedOptions.concat(option2),
27111
27114
  lodash.exports.isEqual
@@ -27113,7 +27116,7 @@ const CustomSelect = ({
27113
27116
  onChange(evt, newSelectedOptions);
27114
27117
  } else {
27115
27118
  const newSelectedOptions = selectedOptions.filter(
27116
- (opt) => opt !== option2
27119
+ (opt) => !lodash.exports.isEqual(opt, option2)
27117
27120
  );
27118
27121
  onChange(evt, newSelectedOptions);
27119
27122
  }
@@ -27509,9 +27512,6 @@ const Select = (props) => {
27509
27512
  closeOnOptionActionClick,
27510
27513
  testId
27511
27514
  } = props;
27512
- console.group("PROPS");
27513
- console.log(props);
27514
- console.groupEnd();
27515
27515
  const enableAutoScroll = !native && autoScroll2 === true;
27516
27516
  const {
27517
27517
  multi,
@@ -27526,14 +27526,6 @@ const Select = (props) => {
27526
27526
  enableAutoScroll,
27527
27527
  checkNonExistentValues
27528
27528
  );
27529
- console.group("standardizeInputs");
27530
- console.log(multi);
27531
- console.log(simpleInputs);
27532
- console.log(options);
27533
- console.log(selectedOptions);
27534
- console.log(firstSelectedOptionIndex);
27535
- console.log(hasNonExistentValue);
27536
- console.groupEnd();
27537
27529
  const canUseNative = !multi;
27538
27530
  const useNative = native && canUseNative;
27539
27531
  if (native && !canUseNative) {
@@ -27561,31 +27553,20 @@ const Select = (props) => {
27561
27553
  ]
27562
27554
  }) : error2;
27563
27555
  const onChangeSelectedValue = (evt, selectedOptions2) => {
27564
- console.group("ON CHANGE");
27565
- console.group("ON CHANGE PROPS");
27566
- console.log(evt);
27567
- console.log(selectedOptions2);
27568
- console.groupEnd();
27569
27556
  if (deprecatedEventHandler) {
27570
- console.log("DEPRECATED");
27571
27557
  const newSelectedOptions = multi ? selectedOptions2.map((o) => simpleInputs ? o.value : o) : simpleInputs ? selectedOptions2.value : selectedOptions2;
27572
27558
  onChange(newSelectedOptions);
27573
27559
  } else {
27574
- console.log("DEPRECATED ELSE");
27575
27560
  const isSyntheticEvent = !(evt instanceof Event);
27576
27561
  const value = multi ? selectedOptions2 : selectedOptions2.value;
27577
- console.log("VALUE", value);
27578
27562
  if (isSyntheticEvent) {
27579
- console.log("SYNTHETIC");
27580
27563
  evt.target.name = name2;
27581
27564
  evt.target.value = value;
27582
27565
  if (!multi) {
27583
- console.log("NO MULTI");
27584
27566
  evt.target.label = selectedOptions2.label;
27585
27567
  }
27586
27568
  onChange(evt);
27587
27569
  } else {
27588
- console.log("SYNTHETIC ELSE");
27589
27570
  onChange({
27590
27571
  ...evt,
27591
27572
  target: {
@@ -27597,7 +27578,6 @@ const Select = (props) => {
27597
27578
  });
27598
27579
  }
27599
27580
  }
27600
- console.groupEnd();
27601
27581
  };
27602
27582
  return useNative ? /* @__PURE__ */ jsx(NativeSelect, {
27603
27583
  ...props,