@apexcura/ui-components 0.0.13-Beta98 → 0.0.14-Beta0
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 +13 -7
- package/dist/index.mjs +13 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -182,10 +182,18 @@ var import_react5 = __toESM(require("react"));
|
|
|
182
182
|
var import_antd5 = require("antd");
|
|
183
183
|
var SelectElement = (props) => {
|
|
184
184
|
const handleChange = (value) => {
|
|
185
|
-
console.log("
|
|
185
|
+
console.log("++++++++", typeof value);
|
|
186
186
|
if (props.onChange) {
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
if (typeof value === "string") {
|
|
188
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
189
|
+
console.log(filterOption2);
|
|
190
|
+
props.onChange(filterOption2);
|
|
191
|
+
} else {
|
|
192
|
+
const selectedOptions = value ? value.map((eachVal) => {
|
|
193
|
+
return props.options && props.options.find((eachOption) => eachOption.value === eachVal);
|
|
194
|
+
}) : [];
|
|
195
|
+
props.onChange(selectedOptions);
|
|
196
|
+
}
|
|
189
197
|
}
|
|
190
198
|
};
|
|
191
199
|
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(
|
|
@@ -682,10 +690,8 @@ var TableElement = (props) => {
|
|
|
682
690
|
}));
|
|
683
691
|
const count = dataSource ? dataSource.length : 0;
|
|
684
692
|
const onChangePage = (page, pageSize) => {
|
|
685
|
-
console.log("pageSize", pageSize);
|
|
686
|
-
console.log("page", page);
|
|
687
693
|
if (props.onChange) {
|
|
688
|
-
props.onChange({ page, pageSize });
|
|
694
|
+
props.onChange({ name: "pagination", page, pageSize });
|
|
689
695
|
}
|
|
690
696
|
};
|
|
691
697
|
const onSelectChange = (newSelectedRowKeys) => {
|
|
@@ -894,7 +900,7 @@ var FileUpload = (props) => {
|
|
|
894
900
|
accept: props.accept,
|
|
895
901
|
listType: "picture",
|
|
896
902
|
maxCount: props.max_count,
|
|
897
|
-
multiple:
|
|
903
|
+
multiple: props.multiple,
|
|
898
904
|
fileList: files,
|
|
899
905
|
beforeUpload,
|
|
900
906
|
onChange: handleChange,
|
package/dist/index.mjs
CHANGED
|
@@ -125,10 +125,18 @@ import React5 from "react";
|
|
|
125
125
|
import { Select } from "antd";
|
|
126
126
|
var SelectElement = (props) => {
|
|
127
127
|
const handleChange = (value) => {
|
|
128
|
-
console.log("
|
|
128
|
+
console.log("++++++++", typeof value);
|
|
129
129
|
if (props.onChange) {
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
if (typeof value === "string") {
|
|
131
|
+
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
132
|
+
console.log(filterOption2);
|
|
133
|
+
props.onChange(filterOption2);
|
|
134
|
+
} else {
|
|
135
|
+
const selectedOptions = value ? value.map((eachVal) => {
|
|
136
|
+
return props.options && props.options.find((eachOption) => eachOption.value === eachVal);
|
|
137
|
+
}) : [];
|
|
138
|
+
props.onChange(selectedOptions);
|
|
139
|
+
}
|
|
132
140
|
}
|
|
133
141
|
};
|
|
134
142
|
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(
|
|
@@ -625,10 +633,8 @@ var TableElement = (props) => {
|
|
|
625
633
|
}));
|
|
626
634
|
const count = dataSource ? dataSource.length : 0;
|
|
627
635
|
const onChangePage = (page, pageSize) => {
|
|
628
|
-
console.log("pageSize", pageSize);
|
|
629
|
-
console.log("page", page);
|
|
630
636
|
if (props.onChange) {
|
|
631
|
-
props.onChange({ page, pageSize });
|
|
637
|
+
props.onChange({ name: "pagination", page, pageSize });
|
|
632
638
|
}
|
|
633
639
|
};
|
|
634
640
|
const onSelectChange = (newSelectedRowKeys) => {
|
|
@@ -837,7 +843,7 @@ var FileUpload = (props) => {
|
|
|
837
843
|
accept: props.accept,
|
|
838
844
|
listType: "picture",
|
|
839
845
|
maxCount: props.max_count,
|
|
840
|
-
multiple:
|
|
846
|
+
multiple: props.multiple,
|
|
841
847
|
fileList: files,
|
|
842
848
|
beforeUpload,
|
|
843
849
|
onChange: handleChange,
|