@apexcura/ui-components 0.0.13-Beta79 → 0.0.13-Beta80

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
@@ -378,7 +378,7 @@ var ButtonElement = (props) => {
378
378
  onClick: () => props.onClick && props.onClick(),
379
379
  className: `${props.className ? props.className : ""}`
380
380
  },
381
- props.icon && /* @__PURE__ */ import_react11.default.createElement("img", { src: props.icon }),
381
+ props.icon && /* @__PURE__ */ import_react11.default.createElement("img", { className: props.iconsClassName, src: props.icon }),
382
382
  props.label
383
383
  );
384
384
  };
@@ -808,10 +808,10 @@ var MultiSelect = (props) => {
808
808
  const [selectedValue, setSelectedValue] = (0, import_react25.useState)({ firstValue: {}, secondValue: {} });
809
809
  const handleFirstChange = (value) => {
810
810
  if (props.onChange) {
811
- const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
811
+ const filterOption2 = props.options?.find((eachOption) => eachOption.value === value);
812
812
  console.log("filterOption1--------", filterOption2);
813
- setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 && filterOption2 }));
814
- props.onChange(selectedValue.firstValue && selectedValue);
813
+ setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 }));
814
+ props.onChange(selectedValue);
815
815
  }
816
816
  };
817
817
  const handleSecondChange = (value) => {
@@ -894,7 +894,7 @@ var TabsElement = (props) => {
894
894
  console.log(props);
895
895
  const handleChange = (key) => {
896
896
  if (props.onChange) {
897
- props.onChange(props.options?.filter((eachOption) => eachOption.key === key));
897
+ props.onChange(props.options?.find((eachOption) => eachOption.key === key));
898
898
  }
899
899
  console.log(key);
900
900
  };
package/dist/index.mjs CHANGED
@@ -321,7 +321,7 @@ var ButtonElement = (props) => {
321
321
  onClick: () => props.onClick && props.onClick(),
322
322
  className: `${props.className ? props.className : ""}`
323
323
  },
324
- props.icon && /* @__PURE__ */ React11.createElement("img", { src: props.icon }),
324
+ props.icon && /* @__PURE__ */ React11.createElement("img", { className: props.iconsClassName, src: props.icon }),
325
325
  props.label
326
326
  );
327
327
  };
@@ -751,10 +751,10 @@ var MultiSelect = (props) => {
751
751
  const [selectedValue, setSelectedValue] = useState7({ firstValue: {}, secondValue: {} });
752
752
  const handleFirstChange = (value) => {
753
753
  if (props.onChange) {
754
- const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
754
+ const filterOption2 = props.options?.find((eachOption) => eachOption.value === value);
755
755
  console.log("filterOption1--------", filterOption2);
756
- setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 && filterOption2 }));
757
- props.onChange(selectedValue.firstValue && selectedValue);
756
+ setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 }));
757
+ props.onChange(selectedValue);
758
758
  }
759
759
  };
760
760
  const handleSecondChange = (value) => {
@@ -837,7 +837,7 @@ var TabsElement = (props) => {
837
837
  console.log(props);
838
838
  const handleChange = (key) => {
839
839
  if (props.onChange) {
840
- props.onChange(props.options?.filter((eachOption) => eachOption.key === key));
840
+ props.onChange(props.options?.find((eachOption) => eachOption.key === key));
841
841
  }
842
842
  console.log(key);
843
843
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.13-Beta79",
3
+ "version": "0.0.13-Beta80",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",