@apexcura/ui-components 0.0.13-Beta32 → 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 +12 -10
- package/dist/index.mjs +12 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -189,7 +189,8 @@ var SelectElement = (props) => {
|
|
|
189
189
|
const handleChange = (value) => {
|
|
190
190
|
console.log("sigleselectvalue----", value);
|
|
191
191
|
if (props.onChange) {
|
|
192
|
-
props.
|
|
192
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
193
|
+
props.onChange(filterOption2);
|
|
193
194
|
}
|
|
194
195
|
};
|
|
195
196
|
return /* @__PURE__ */ import_react5.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react5.default.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ import_react5.default.createElement(
|
|
@@ -876,7 +877,7 @@ var import_react27 = __toESM(require("react"));
|
|
|
876
877
|
var import_antd19 = require("antd");
|
|
877
878
|
var MultiSelect = (props) => {
|
|
878
879
|
const [options, setOptions] = (0, import_react27.useState)([]);
|
|
879
|
-
const [selectedOptions, setSelectedOptions] = (0, import_react27.useState)(
|
|
880
|
+
const [selectedOptions, setSelectedOptions] = (0, import_react27.useState)([]);
|
|
880
881
|
(0, import_react27.useEffect)(() => {
|
|
881
882
|
const newOptions = [];
|
|
882
883
|
for (let i = 1; i < 100; i++) {
|
|
@@ -885,18 +886,19 @@ var MultiSelect = (props) => {
|
|
|
885
886
|
label: i
|
|
886
887
|
});
|
|
887
888
|
}
|
|
888
|
-
setOptions(newOptions);
|
|
889
|
+
setOptions(newOptions && newOptions);
|
|
889
890
|
console.log("options========", options);
|
|
890
891
|
}, []);
|
|
891
|
-
const handleChange = (
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
[
|
|
896
|
-
|
|
892
|
+
const handleChange = (value) => {
|
|
893
|
+
const filterOption2 = options.find((eachOption) => eachOption.value === value);
|
|
894
|
+
console.log("filterOption", filterOption2);
|
|
895
|
+
if (filterOption2) {
|
|
896
|
+
setSelectedOptions((prev) => [...prev, filterOption2]);
|
|
897
|
+
console.log(selectedOptions);
|
|
898
|
+
}
|
|
897
899
|
};
|
|
898
900
|
console.log("selectedOptions", selectedOptions);
|
|
899
|
-
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(
|
|
900
902
|
import_antd19.Select,
|
|
901
903
|
{
|
|
902
904
|
onChange: handleChange,
|
package/dist/index.mjs
CHANGED
|
@@ -133,7 +133,8 @@ var SelectElement = (props) => {
|
|
|
133
133
|
const handleChange = (value) => {
|
|
134
134
|
console.log("sigleselectvalue----", value);
|
|
135
135
|
if (props.onChange) {
|
|
136
|
-
props.
|
|
136
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
137
|
+
props.onChange(filterOption2);
|
|
137
138
|
}
|
|
138
139
|
};
|
|
139
140
|
return /* @__PURE__ */ React5.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ React5.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ React5.createElement(
|
|
@@ -820,7 +821,7 @@ import React26, { useState as useState7, useEffect as useEffect2 } from "react";
|
|
|
820
821
|
import { Select as Select4 } from "antd";
|
|
821
822
|
var MultiSelect = (props) => {
|
|
822
823
|
const [options, setOptions] = useState7([]);
|
|
823
|
-
const [selectedOptions, setSelectedOptions] = useState7(
|
|
824
|
+
const [selectedOptions, setSelectedOptions] = useState7([]);
|
|
824
825
|
useEffect2(() => {
|
|
825
826
|
const newOptions = [];
|
|
826
827
|
for (let i = 1; i < 100; i++) {
|
|
@@ -829,18 +830,19 @@ var MultiSelect = (props) => {
|
|
|
829
830
|
label: i
|
|
830
831
|
});
|
|
831
832
|
}
|
|
832
|
-
setOptions(newOptions);
|
|
833
|
+
setOptions(newOptions && newOptions);
|
|
833
834
|
console.log("options========", options);
|
|
834
835
|
}, []);
|
|
835
|
-
const handleChange = (
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
[
|
|
840
|
-
|
|
836
|
+
const handleChange = (value) => {
|
|
837
|
+
const filterOption2 = options.find((eachOption) => eachOption.value === value);
|
|
838
|
+
console.log("filterOption", filterOption2);
|
|
839
|
+
if (filterOption2) {
|
|
840
|
+
setSelectedOptions((prev) => [...prev, filterOption2]);
|
|
841
|
+
console.log(selectedOptions);
|
|
842
|
+
}
|
|
841
843
|
};
|
|
842
844
|
console.log("selectedOptions", selectedOptions);
|
|
843
|
-
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(
|
|
844
846
|
Select4,
|
|
845
847
|
{
|
|
846
848
|
onChange: handleChange,
|