@faasjs/ant-design 0.0.3-beta.60 → 0.0.3-beta.61
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 +33 -4
- package/dist/index.mjs +35 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1526,10 +1526,39 @@ function Table(props) {
|
|
|
1526
1526
|
setColumns((prev) => {
|
|
1527
1527
|
const newColumns = [...prev];
|
|
1528
1528
|
const index = newColumns.findIndex((item) => item.id === column.id);
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1529
|
+
if (filters.length < 11)
|
|
1530
|
+
newColumns[index].filters = filters.concat({
|
|
1531
|
+
text: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Blank, {}),
|
|
1532
|
+
value: null
|
|
1533
|
+
});
|
|
1534
|
+
else
|
|
1535
|
+
newColumns[index].filterDropdown = ({
|
|
1536
|
+
setSelectedKeys,
|
|
1537
|
+
selectedKeys,
|
|
1538
|
+
confirm
|
|
1539
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
1540
|
+
style: {
|
|
1541
|
+
padding: 8,
|
|
1542
|
+
width: "200px"
|
|
1543
|
+
},
|
|
1544
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
1545
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd12.Select, {
|
|
1546
|
+
options: filters.map((f) => ({
|
|
1547
|
+
label: f.text,
|
|
1548
|
+
value: f.value
|
|
1549
|
+
})),
|
|
1550
|
+
allowClear: true,
|
|
1551
|
+
showSearch: true,
|
|
1552
|
+
style: { width: "100%" },
|
|
1553
|
+
placeholder: `${common2.search} ${newColumns[index].title}`,
|
|
1554
|
+
value: selectedKeys,
|
|
1555
|
+
onChange: (v) => {
|
|
1556
|
+
setSelectedKeys((v == null ? void 0 : v.length) ? v : []);
|
|
1557
|
+
confirm();
|
|
1558
|
+
},
|
|
1559
|
+
mode: "multiple"
|
|
1560
|
+
})
|
|
1561
|
+
});
|
|
1533
1562
|
return newColumns;
|
|
1534
1563
|
});
|
|
1535
1564
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1163,7 +1163,8 @@ import {
|
|
|
1163
1163
|
import {
|
|
1164
1164
|
Table as AntdTable,
|
|
1165
1165
|
Radio,
|
|
1166
|
-
Input as Input2
|
|
1166
|
+
Input as Input2,
|
|
1167
|
+
Select as Select2
|
|
1167
1168
|
} from "antd";
|
|
1168
1169
|
import dayjs2 from "dayjs";
|
|
1169
1170
|
import { CheckOutlined as CheckOutlined2, CloseOutlined as CloseOutlined2 } from "@ant-design/icons";
|
|
@@ -1532,10 +1533,39 @@ function Table(props) {
|
|
|
1532
1533
|
setColumns((prev) => {
|
|
1533
1534
|
const newColumns = [...prev];
|
|
1534
1535
|
const index = newColumns.findIndex((item) => item.id === column.id);
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1536
|
+
if (filters.length < 11)
|
|
1537
|
+
newColumns[index].filters = filters.concat({
|
|
1538
|
+
text: /* @__PURE__ */ jsx14(Blank, {}),
|
|
1539
|
+
value: null
|
|
1540
|
+
});
|
|
1541
|
+
else
|
|
1542
|
+
newColumns[index].filterDropdown = ({
|
|
1543
|
+
setSelectedKeys,
|
|
1544
|
+
selectedKeys,
|
|
1545
|
+
confirm
|
|
1546
|
+
}) => /* @__PURE__ */ jsx14("div", {
|
|
1547
|
+
style: {
|
|
1548
|
+
padding: 8,
|
|
1549
|
+
width: "200px"
|
|
1550
|
+
},
|
|
1551
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
1552
|
+
children: /* @__PURE__ */ jsx14(Select2, {
|
|
1553
|
+
options: filters.map((f) => ({
|
|
1554
|
+
label: f.text,
|
|
1555
|
+
value: f.value
|
|
1556
|
+
})),
|
|
1557
|
+
allowClear: true,
|
|
1558
|
+
showSearch: true,
|
|
1559
|
+
style: { width: "100%" },
|
|
1560
|
+
placeholder: `${common2.search} ${newColumns[index].title}`,
|
|
1561
|
+
value: selectedKeys,
|
|
1562
|
+
onChange: (v) => {
|
|
1563
|
+
setSelectedKeys((v == null ? void 0 : v.length) ? v : []);
|
|
1564
|
+
confirm();
|
|
1565
|
+
},
|
|
1566
|
+
mode: "multiple"
|
|
1567
|
+
})
|
|
1568
|
+
});
|
|
1539
1569
|
return newColumns;
|
|
1540
1570
|
});
|
|
1541
1571
|
}
|