@faasjs/ant-design 0.0.3-beta.21 → 0.0.3-beta.23
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 +8 -8
- package/dist/index.mjs +8 -8
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1032,7 +1032,7 @@ function Table(props) {
|
|
|
1032
1032
|
case "string":
|
|
1033
1033
|
if (!item.render)
|
|
1034
1034
|
item.render = (value) => processValue(item, value);
|
|
1035
|
-
if (!
|
|
1035
|
+
if (!item.onFilter)
|
|
1036
1036
|
item.onFilter = (value, row) => {
|
|
1037
1037
|
if (value === null && (0, import_lodash_es6.isNil)(row[item.id]))
|
|
1038
1038
|
return true;
|
|
@@ -1062,7 +1062,7 @@ function Table(props) {
|
|
|
1062
1062
|
case "string[]":
|
|
1063
1063
|
if (!item.render)
|
|
1064
1064
|
item.render = (value) => processValue(item, value);
|
|
1065
|
-
if (!
|
|
1065
|
+
if (!item.onFilter)
|
|
1066
1066
|
item.onFilter = (value, row) => {
|
|
1067
1067
|
if (value === null && (!row[item.id] || !row[item.id].length))
|
|
1068
1068
|
return true;
|
|
@@ -1094,7 +1094,7 @@ function Table(props) {
|
|
|
1094
1094
|
item.render = (value) => processValue(item, value);
|
|
1095
1095
|
if (!item.sorter)
|
|
1096
1096
|
item.sorter = (a, b) => a[item.id] - b[item.id];
|
|
1097
|
-
if (!
|
|
1097
|
+
if (!item.onFilter)
|
|
1098
1098
|
item.onFilter = (value, row) => {
|
|
1099
1099
|
if (value === null && (0, import_lodash_es6.isNil)(row[item.id]))
|
|
1100
1100
|
return true;
|
|
@@ -1122,7 +1122,7 @@ function Table(props) {
|
|
|
1122
1122
|
case "number[]":
|
|
1123
1123
|
if (!item.render)
|
|
1124
1124
|
item.render = (value) => processValue(item, value).join(", ");
|
|
1125
|
-
if (!
|
|
1125
|
+
if (!item.onFilter)
|
|
1126
1126
|
item.onFilter = (value, row) => {
|
|
1127
1127
|
if (value === null && (!row[item.id] || !row[item.id].length))
|
|
1128
1128
|
return true;
|
|
@@ -1203,7 +1203,7 @@ function Table(props) {
|
|
|
1203
1203
|
})
|
|
1204
1204
|
]
|
|
1205
1205
|
});
|
|
1206
|
-
if (!
|
|
1206
|
+
if (!item.onFilter)
|
|
1207
1207
|
item.onFilter = (value, row) => {
|
|
1208
1208
|
switch (value) {
|
|
1209
1209
|
case "true":
|
|
@@ -1220,7 +1220,7 @@ function Table(props) {
|
|
|
1220
1220
|
case "date":
|
|
1221
1221
|
if (!item.render)
|
|
1222
1222
|
item.render = (value) => processValue(item, value);
|
|
1223
|
-
if (!
|
|
1223
|
+
if (!item.onFilter)
|
|
1224
1224
|
item.onFilter = (value, row) => (0, import_dayjs2.default)(row[item.id]).isSame((0, import_dayjs2.default)(value));
|
|
1225
1225
|
if (!item.sorter)
|
|
1226
1226
|
item.sorter = (a, b) => (0, import_dayjs2.default)(a[item.id]).isBefore(b[item.id]) ? -1 : 1;
|
|
@@ -1228,7 +1228,7 @@ function Table(props) {
|
|
|
1228
1228
|
case "time":
|
|
1229
1229
|
if (!item.render)
|
|
1230
1230
|
item.render = (value) => processValue(item, value);
|
|
1231
|
-
if (!
|
|
1231
|
+
if (!item.onFilter)
|
|
1232
1232
|
item.onFilter = (value, row) => (0, import_dayjs2.default)(row[item.id]).isSame((0, import_dayjs2.default)(value));
|
|
1233
1233
|
if (!item.sorter)
|
|
1234
1234
|
item.sorter = (a, b) => (0, import_dayjs2.default)(a[item.id]).isBefore(b[item.id]) ? -1 : 1;
|
|
@@ -1317,7 +1317,7 @@ function FaasDataTable({
|
|
|
1317
1317
|
setCurrentColumns((prev) => {
|
|
1318
1318
|
const newColumns = [...prev];
|
|
1319
1319
|
for (const column of newColumns) {
|
|
1320
|
-
if (data["options"][column.id]) {
|
|
1320
|
+
if (data["options"] && data.options[column.id]) {
|
|
1321
1321
|
column.options = data["options"][column.id];
|
|
1322
1322
|
column.filters = data["options"][column.id].map((v) => ({
|
|
1323
1323
|
text: v.label,
|
package/dist/index.mjs
CHANGED
|
@@ -1038,7 +1038,7 @@ function Table(props) {
|
|
|
1038
1038
|
case "string":
|
|
1039
1039
|
if (!item.render)
|
|
1040
1040
|
item.render = (value) => processValue(item, value);
|
|
1041
|
-
if (!
|
|
1041
|
+
if (!item.onFilter)
|
|
1042
1042
|
item.onFilter = (value, row) => {
|
|
1043
1043
|
if (value === null && isNil2(row[item.id]))
|
|
1044
1044
|
return true;
|
|
@@ -1068,7 +1068,7 @@ function Table(props) {
|
|
|
1068
1068
|
case "string[]":
|
|
1069
1069
|
if (!item.render)
|
|
1070
1070
|
item.render = (value) => processValue(item, value);
|
|
1071
|
-
if (!
|
|
1071
|
+
if (!item.onFilter)
|
|
1072
1072
|
item.onFilter = (value, row) => {
|
|
1073
1073
|
if (value === null && (!row[item.id] || !row[item.id].length))
|
|
1074
1074
|
return true;
|
|
@@ -1100,7 +1100,7 @@ function Table(props) {
|
|
|
1100
1100
|
item.render = (value) => processValue(item, value);
|
|
1101
1101
|
if (!item.sorter)
|
|
1102
1102
|
item.sorter = (a, b) => a[item.id] - b[item.id];
|
|
1103
|
-
if (!
|
|
1103
|
+
if (!item.onFilter)
|
|
1104
1104
|
item.onFilter = (value, row) => {
|
|
1105
1105
|
if (value === null && isNil2(row[item.id]))
|
|
1106
1106
|
return true;
|
|
@@ -1128,7 +1128,7 @@ function Table(props) {
|
|
|
1128
1128
|
case "number[]":
|
|
1129
1129
|
if (!item.render)
|
|
1130
1130
|
item.render = (value) => processValue(item, value).join(", ");
|
|
1131
|
-
if (!
|
|
1131
|
+
if (!item.onFilter)
|
|
1132
1132
|
item.onFilter = (value, row) => {
|
|
1133
1133
|
if (value === null && (!row[item.id] || !row[item.id].length))
|
|
1134
1134
|
return true;
|
|
@@ -1209,7 +1209,7 @@ function Table(props) {
|
|
|
1209
1209
|
})
|
|
1210
1210
|
]
|
|
1211
1211
|
});
|
|
1212
|
-
if (!
|
|
1212
|
+
if (!item.onFilter)
|
|
1213
1213
|
item.onFilter = (value, row) => {
|
|
1214
1214
|
switch (value) {
|
|
1215
1215
|
case "true":
|
|
@@ -1226,7 +1226,7 @@ function Table(props) {
|
|
|
1226
1226
|
case "date":
|
|
1227
1227
|
if (!item.render)
|
|
1228
1228
|
item.render = (value) => processValue(item, value);
|
|
1229
|
-
if (!
|
|
1229
|
+
if (!item.onFilter)
|
|
1230
1230
|
item.onFilter = (value, row) => dayjs2(row[item.id]).isSame(dayjs2(value));
|
|
1231
1231
|
if (!item.sorter)
|
|
1232
1232
|
item.sorter = (a, b) => dayjs2(a[item.id]).isBefore(b[item.id]) ? -1 : 1;
|
|
@@ -1234,7 +1234,7 @@ function Table(props) {
|
|
|
1234
1234
|
case "time":
|
|
1235
1235
|
if (!item.render)
|
|
1236
1236
|
item.render = (value) => processValue(item, value);
|
|
1237
|
-
if (!
|
|
1237
|
+
if (!item.onFilter)
|
|
1238
1238
|
item.onFilter = (value, row) => dayjs2(row[item.id]).isSame(dayjs2(value));
|
|
1239
1239
|
if (!item.sorter)
|
|
1240
1240
|
item.sorter = (a, b) => dayjs2(a[item.id]).isBefore(b[item.id]) ? -1 : 1;
|
|
@@ -1323,7 +1323,7 @@ function FaasDataTable({
|
|
|
1323
1323
|
setCurrentColumns((prev) => {
|
|
1324
1324
|
const newColumns = [...prev];
|
|
1325
1325
|
for (const column of newColumns) {
|
|
1326
|
-
if (data["options"][column.id]) {
|
|
1326
|
+
if (data["options"] && data.options[column.id]) {
|
|
1327
1327
|
column.options = data["options"][column.id];
|
|
1328
1328
|
column.filters = data["options"][column.id].map((v) => ({
|
|
1329
1329
|
text: v.label,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/ant-design",
|
|
3
|
-
"version": "0.0.3-beta.
|
|
3
|
+
"version": "0.0.3-beta.23",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"lodash-es": "*",
|
|
29
29
|
"react": "*",
|
|
30
30
|
"react-dom": "*",
|
|
31
|
-
"@faasjs/react": "^0.0.3-beta.
|
|
31
|
+
"@faasjs/react": "^0.0.3-beta.23",
|
|
32
32
|
"react-router-dom": "*",
|
|
33
33
|
"dayjs": "*"
|
|
34
34
|
},
|