@apexcura/ui-components 0.0.13-Beta99 → 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 -8
- package/dist/index.mjs +13 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -182,11 +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
|
-
|
|
189
|
-
|
|
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
|
+
}
|
|
190
197
|
}
|
|
191
198
|
};
|
|
192
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(
|
|
@@ -683,10 +690,8 @@ var TableElement = (props) => {
|
|
|
683
690
|
}));
|
|
684
691
|
const count = dataSource ? dataSource.length : 0;
|
|
685
692
|
const onChangePage = (page, pageSize) => {
|
|
686
|
-
console.log("pageSize", pageSize);
|
|
687
|
-
console.log("page", page);
|
|
688
693
|
if (props.onChange) {
|
|
689
|
-
props.onChange({ page, pageSize });
|
|
694
|
+
props.onChange({ name: "pagination", page, pageSize });
|
|
690
695
|
}
|
|
691
696
|
};
|
|
692
697
|
const onSelectChange = (newSelectedRowKeys) => {
|
|
@@ -895,7 +900,7 @@ var FileUpload = (props) => {
|
|
|
895
900
|
accept: props.accept,
|
|
896
901
|
listType: "picture",
|
|
897
902
|
maxCount: props.max_count,
|
|
898
|
-
multiple:
|
|
903
|
+
multiple: props.multiple,
|
|
899
904
|
fileList: files,
|
|
900
905
|
beforeUpload,
|
|
901
906
|
onChange: handleChange,
|
package/dist/index.mjs
CHANGED
|
@@ -125,11 +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
|
-
|
|
132
|
-
|
|
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
|
+
}
|
|
133
140
|
}
|
|
134
141
|
};
|
|
135
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(
|
|
@@ -626,10 +633,8 @@ var TableElement = (props) => {
|
|
|
626
633
|
}));
|
|
627
634
|
const count = dataSource ? dataSource.length : 0;
|
|
628
635
|
const onChangePage = (page, pageSize) => {
|
|
629
|
-
console.log("pageSize", pageSize);
|
|
630
|
-
console.log("page", page);
|
|
631
636
|
if (props.onChange) {
|
|
632
|
-
props.onChange({ page, pageSize });
|
|
637
|
+
props.onChange({ name: "pagination", page, pageSize });
|
|
633
638
|
}
|
|
634
639
|
};
|
|
635
640
|
const onSelectChange = (newSelectedRowKeys) => {
|
|
@@ -838,7 +843,7 @@ var FileUpload = (props) => {
|
|
|
838
843
|
accept: props.accept,
|
|
839
844
|
listType: "picture",
|
|
840
845
|
maxCount: props.max_count,
|
|
841
|
-
multiple:
|
|
846
|
+
multiple: props.multiple,
|
|
842
847
|
fileList: files,
|
|
843
848
|
beforeUpload,
|
|
844
849
|
onChange: handleChange,
|