@apexcura/ui-components 0.0.13-Beta36 → 0.0.13-Beta37
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 +4 -1
- package/dist/index.mjs +5 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -876,15 +876,18 @@ var SingleCheckbox = (props) => {
|
|
|
876
876
|
var import_react27 = __toESM(require("react"));
|
|
877
877
|
var import_antd19 = require("antd");
|
|
878
878
|
var MultiSelect = (props) => {
|
|
879
|
+
const [selectedValue, setSelectedValue] = (0, import_react27.useState)({ firstValue: {}, secondValue: {} });
|
|
879
880
|
const handleFirstChange = (value) => {
|
|
880
881
|
if (props.onChange) {
|
|
881
882
|
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
882
|
-
|
|
883
|
+
setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 }));
|
|
884
|
+
props.onChange(selectedValue);
|
|
883
885
|
}
|
|
884
886
|
};
|
|
885
887
|
const handleSecondChange = (value) => {
|
|
886
888
|
if (props.onChange) {
|
|
887
889
|
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
890
|
+
setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 }));
|
|
888
891
|
props.onChange({ secondValue: filterOption2 });
|
|
889
892
|
}
|
|
890
893
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -817,18 +817,21 @@ var SingleCheckbox = (props) => {
|
|
|
817
817
|
};
|
|
818
818
|
|
|
819
819
|
// src/Components/MultiSelect.tsx
|
|
820
|
-
import React26 from "react";
|
|
820
|
+
import React26, { useState as useState7 } from "react";
|
|
821
821
|
import { Select as Select4 } from "antd";
|
|
822
822
|
var MultiSelect = (props) => {
|
|
823
|
+
const [selectedValue, setSelectedValue] = useState7({ firstValue: {}, secondValue: {} });
|
|
823
824
|
const handleFirstChange = (value) => {
|
|
824
825
|
if (props.onChange) {
|
|
825
826
|
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
826
|
-
|
|
827
|
+
setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 }));
|
|
828
|
+
props.onChange(selectedValue);
|
|
827
829
|
}
|
|
828
830
|
};
|
|
829
831
|
const handleSecondChange = (value) => {
|
|
830
832
|
if (props.onChange) {
|
|
831
833
|
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
834
|
+
setSelectedValue((prev) => ({ ...prev, firstValue: filterOption2 }));
|
|
832
835
|
props.onChange({ secondValue: filterOption2 });
|
|
833
836
|
}
|
|
834
837
|
};
|