@apexcura/ui-components 0.0.13-Beta33 → 0.0.13-Beta34
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 +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -877,7 +877,7 @@ var import_react27 = __toESM(require("react"));
|
|
|
877
877
|
var import_antd19 = require("antd");
|
|
878
878
|
var MultiSelect = (props) => {
|
|
879
879
|
const [options, setOptions] = (0, import_react27.useState)([]);
|
|
880
|
-
const [selectedOptions, setSelectedOptions] = (0, import_react27.useState)(
|
|
880
|
+
const [selectedOptions, setSelectedOptions] = (0, import_react27.useState)([]);
|
|
881
881
|
(0, import_react27.useEffect)(() => {
|
|
882
882
|
const newOptions = [];
|
|
883
883
|
for (let i = 1; i < 100; i++) {
|
|
@@ -886,18 +886,19 @@ var MultiSelect = (props) => {
|
|
|
886
886
|
label: i
|
|
887
887
|
});
|
|
888
888
|
}
|
|
889
|
-
setOptions(newOptions);
|
|
889
|
+
setOptions(newOptions && newOptions);
|
|
890
890
|
console.log("options========", options);
|
|
891
891
|
}, []);
|
|
892
892
|
const handleChange = (value) => {
|
|
893
893
|
const filterOption2 = options.find((eachOption) => eachOption.value === value);
|
|
894
|
-
console.log(filterOption2);
|
|
894
|
+
console.log("filterOption", filterOption2);
|
|
895
895
|
if (filterOption2) {
|
|
896
896
|
setSelectedOptions((prev) => [...prev, filterOption2]);
|
|
897
|
+
console.log(selectedOptions);
|
|
897
898
|
}
|
|
898
899
|
};
|
|
899
900
|
console.log("selectedOptions", selectedOptions);
|
|
900
|
-
return /* @__PURE__ */ import_react27.default.createElement("div", { className: props.className, style: { display: "flex", backgroundColor: "white", borderRadius: 10, border: "1px solid gray", width: "200px" } }, /* @__PURE__ */ import_react27.default.createElement(
|
|
901
|
+
return /* @__PURE__ */ import_react27.default.createElement("div", { className: props.className, style: { display: "flex", flexDirection: "row", backgroundColor: "white", borderRadius: 10, border: "1px solid gray", width: "200px" } }, /* @__PURE__ */ import_react27.default.createElement(
|
|
901
902
|
import_antd19.Select,
|
|
902
903
|
{
|
|
903
904
|
onChange: handleChange,
|
package/dist/index.mjs
CHANGED
|
@@ -821,7 +821,7 @@ import React26, { useState as useState7, useEffect as useEffect2 } from "react";
|
|
|
821
821
|
import { Select as Select4 } from "antd";
|
|
822
822
|
var MultiSelect = (props) => {
|
|
823
823
|
const [options, setOptions] = useState7([]);
|
|
824
|
-
const [selectedOptions, setSelectedOptions] = useState7(
|
|
824
|
+
const [selectedOptions, setSelectedOptions] = useState7([]);
|
|
825
825
|
useEffect2(() => {
|
|
826
826
|
const newOptions = [];
|
|
827
827
|
for (let i = 1; i < 100; i++) {
|
|
@@ -830,18 +830,19 @@ var MultiSelect = (props) => {
|
|
|
830
830
|
label: i
|
|
831
831
|
});
|
|
832
832
|
}
|
|
833
|
-
setOptions(newOptions);
|
|
833
|
+
setOptions(newOptions && newOptions);
|
|
834
834
|
console.log("options========", options);
|
|
835
835
|
}, []);
|
|
836
836
|
const handleChange = (value) => {
|
|
837
837
|
const filterOption2 = options.find((eachOption) => eachOption.value === value);
|
|
838
|
-
console.log(filterOption2);
|
|
838
|
+
console.log("filterOption", filterOption2);
|
|
839
839
|
if (filterOption2) {
|
|
840
840
|
setSelectedOptions((prev) => [...prev, filterOption2]);
|
|
841
|
+
console.log(selectedOptions);
|
|
841
842
|
}
|
|
842
843
|
};
|
|
843
844
|
console.log("selectedOptions", selectedOptions);
|
|
844
|
-
return /* @__PURE__ */ React26.createElement("div", { className: props.className, style: { display: "flex", backgroundColor: "white", borderRadius: 10, border: "1px solid gray", width: "200px" } }, /* @__PURE__ */ React26.createElement(
|
|
845
|
+
return /* @__PURE__ */ React26.createElement("div", { className: props.className, style: { display: "flex", flexDirection: "row", backgroundColor: "white", borderRadius: 10, border: "1px solid gray", width: "200px" } }, /* @__PURE__ */ React26.createElement(
|
|
845
846
|
Select4,
|
|
846
847
|
{
|
|
847
848
|
onChange: handleChange,
|