@faasjs/ant-design 0.0.3-beta.60 → 0.0.3-beta.62
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 +39 -4
- package/dist/index.mjs +41 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1526,10 +1526,45 @@ 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
|
+
filterOption: (input, option) => {
|
|
1561
|
+
if (!input || !option || !option.label)
|
|
1562
|
+
return true;
|
|
1563
|
+
input = input.trim();
|
|
1564
|
+
return option.value === input || option.label.toString().toLowerCase().includes(input.toLowerCase());
|
|
1565
|
+
}
|
|
1566
|
+
})
|
|
1567
|
+
});
|
|
1533
1568
|
return newColumns;
|
|
1534
1569
|
});
|
|
1535
1570
|
}
|
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,45 @@ 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
|
+
filterOption: (input, option) => {
|
|
1568
|
+
if (!input || !option || !option.label)
|
|
1569
|
+
return true;
|
|
1570
|
+
input = input.trim();
|
|
1571
|
+
return option.value === input || option.label.toString().toLowerCase().includes(input.toLowerCase());
|
|
1572
|
+
}
|
|
1573
|
+
})
|
|
1574
|
+
});
|
|
1539
1575
|
return newColumns;
|
|
1540
1576
|
});
|
|
1541
1577
|
}
|