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

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
@@ -892,13 +892,25 @@ var import_react27 = __toESM(require("react"));
892
892
  var import_antd20 = require("antd");
893
893
  var TabsElement = (props) => {
894
894
  console.log(props);
895
- const handleChange = (key) => {
895
+ const handleChange = (label) => {
896
896
  if (props.onChange) {
897
- props.onChange(props.options?.find((eachOption) => eachOption.key === key));
897
+ props.onChange(props.options?.find((eachOption) => eachOption.label === label));
898
898
  }
899
- console.log(key);
900
899
  };
901
- return /* @__PURE__ */ import_react27.default.createElement(import_antd20.Tabs, { defaultActiveKey: "1", items: props.options, onChange: handleChange });
900
+ return /* @__PURE__ */ import_react27.default.createElement(
901
+ import_antd20.Tabs,
902
+ {
903
+ className: props.containerClassName,
904
+ onChange: handleChange,
905
+ items: props.options?.map((item, i) => {
906
+ const id = String(i + 1);
907
+ return {
908
+ label: item.label,
909
+ key: id
910
+ };
911
+ })
912
+ }
913
+ );
902
914
  };
903
915
  // Annotate the CommonJS export names for ESM import in node:
904
916
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -835,13 +835,25 @@ import React27 from "react";
835
835
  import { Tabs } from "antd";
836
836
  var TabsElement = (props) => {
837
837
  console.log(props);
838
- const handleChange = (key) => {
838
+ const handleChange = (label) => {
839
839
  if (props.onChange) {
840
- props.onChange(props.options?.find((eachOption) => eachOption.key === key));
840
+ props.onChange(props.options?.find((eachOption) => eachOption.label === label));
841
841
  }
842
- console.log(key);
843
842
  };
844
- return /* @__PURE__ */ React27.createElement(Tabs, { defaultActiveKey: "1", items: props.options, onChange: handleChange });
843
+ return /* @__PURE__ */ React27.createElement(
844
+ Tabs,
845
+ {
846
+ className: props.containerClassName,
847
+ onChange: handleChange,
848
+ items: props.options?.map((item, i) => {
849
+ const id = String(i + 1);
850
+ return {
851
+ label: item.label,
852
+ key: id
853
+ };
854
+ })
855
+ }
856
+ );
845
857
  };
846
858
  export {
847
859
  AddMoreTable,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.13-Beta80",
3
+ "version": "0.0.13-Beta82",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",