@faasjs/ant-design 0.0.2-beta.414 → 0.0.2-beta.415
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 +37 -1
- package/dist/index.mjs +41 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -969,8 +969,44 @@ function Table(props) {
|
|
|
969
969
|
switch (item.type) {
|
|
970
970
|
case "string":
|
|
971
971
|
item.render = (value) => processValue(item, value);
|
|
972
|
-
if (!item.onFilter)
|
|
972
|
+
if (!item.onFilter) {
|
|
973
973
|
item.onFilter = (value, row) => row[item.id].includes(value);
|
|
974
|
+
if (item.filterDropdown !== false)
|
|
975
|
+
item.filterDropdown = ({
|
|
976
|
+
setSelectedKeys,
|
|
977
|
+
selectedKeys,
|
|
978
|
+
confirm,
|
|
979
|
+
clearFilters
|
|
980
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
981
|
+
style: { padding: 8 },
|
|
982
|
+
children: [
|
|
983
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
|
|
984
|
+
value: selectedKeys[0],
|
|
985
|
+
onChange: (e) => setSelectedKeys(e.target.value ? [e.target.value] : []),
|
|
986
|
+
style: {
|
|
987
|
+
width: 188,
|
|
988
|
+
marginBottom: 8,
|
|
989
|
+
display: "block"
|
|
990
|
+
}
|
|
991
|
+
}),
|
|
992
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
993
|
+
type: "button",
|
|
994
|
+
onClick: () => confirm(),
|
|
995
|
+
style: {
|
|
996
|
+
width: 90,
|
|
997
|
+
marginRight: 8
|
|
998
|
+
},
|
|
999
|
+
children: "Search"
|
|
1000
|
+
}),
|
|
1001
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
1002
|
+
type: "button",
|
|
1003
|
+
onClick: () => clearFilters(),
|
|
1004
|
+
style: { width: 90 },
|
|
1005
|
+
children: "Reset"
|
|
1006
|
+
})
|
|
1007
|
+
]
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
974
1010
|
break;
|
|
975
1011
|
case "string[]":
|
|
976
1012
|
item.render = (value) => processValue(item, value).join(", ");
|
package/dist/index.mjs
CHANGED
|
@@ -882,7 +882,10 @@ import {
|
|
|
882
882
|
Skeleton as Skeleton3
|
|
883
883
|
} from "antd";
|
|
884
884
|
import dayjs3 from "dayjs";
|
|
885
|
-
import {
|
|
885
|
+
import {
|
|
886
|
+
CheckOutlined as CheckOutlined2,
|
|
887
|
+
CloseOutlined as CloseOutlined2
|
|
888
|
+
} from "@ant-design/icons";
|
|
886
889
|
import { isNil as isNil2, upperFirst as upperFirst4 } from "lodash";
|
|
887
890
|
import { FaasDataWrapper as FaasDataWrapper2 } from "@faasjs/react";
|
|
888
891
|
import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
@@ -958,8 +961,44 @@ function Table(props) {
|
|
|
958
961
|
switch (item.type) {
|
|
959
962
|
case "string":
|
|
960
963
|
item.render = (value) => processValue(item, value);
|
|
961
|
-
if (!item.onFilter)
|
|
964
|
+
if (!item.onFilter) {
|
|
962
965
|
item.onFilter = (value, row) => row[item.id].includes(value);
|
|
966
|
+
if (item.filterDropdown !== false)
|
|
967
|
+
item.filterDropdown = ({
|
|
968
|
+
setSelectedKeys,
|
|
969
|
+
selectedKeys,
|
|
970
|
+
confirm,
|
|
971
|
+
clearFilters
|
|
972
|
+
}) => /* @__PURE__ */ jsxs4("div", {
|
|
973
|
+
style: { padding: 8 },
|
|
974
|
+
children: [
|
|
975
|
+
/* @__PURE__ */ jsx11("input", {
|
|
976
|
+
value: selectedKeys[0],
|
|
977
|
+
onChange: (e) => setSelectedKeys(e.target.value ? [e.target.value] : []),
|
|
978
|
+
style: {
|
|
979
|
+
width: 188,
|
|
980
|
+
marginBottom: 8,
|
|
981
|
+
display: "block"
|
|
982
|
+
}
|
|
983
|
+
}),
|
|
984
|
+
/* @__PURE__ */ jsx11("button", {
|
|
985
|
+
type: "button",
|
|
986
|
+
onClick: () => confirm(),
|
|
987
|
+
style: {
|
|
988
|
+
width: 90,
|
|
989
|
+
marginRight: 8
|
|
990
|
+
},
|
|
991
|
+
children: "Search"
|
|
992
|
+
}),
|
|
993
|
+
/* @__PURE__ */ jsx11("button", {
|
|
994
|
+
type: "button",
|
|
995
|
+
onClick: () => clearFilters(),
|
|
996
|
+
style: { width: 90 },
|
|
997
|
+
children: "Reset"
|
|
998
|
+
})
|
|
999
|
+
]
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
963
1002
|
break;
|
|
964
1003
|
case "string[]":
|
|
965
1004
|
item.render = (value) => processValue(item, value).join(", ");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/ant-design",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.415",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"lodash": "*",
|
|
29
29
|
"react": "*",
|
|
30
30
|
"react-dom": "*",
|
|
31
|
-
"@faasjs/react": "^0.0.2-beta.
|
|
31
|
+
"@faasjs/react": "^0.0.2-beta.415",
|
|
32
32
|
"react-router-dom": "*",
|
|
33
33
|
"dayjs": "*"
|
|
34
34
|
},
|