@faasjs/ant-design 0.0.4-beta.13 → 0.0.4-beta.14

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 CHANGED
@@ -989,7 +989,7 @@ function Table(props) {
989
989
  const [columns, setColumns] = react$1.useState();
990
990
  const { common: common2 } = useConfigContext();
991
991
  const generateFilterDropdown = (item) => {
992
- if (typeof item.filterDropdown !== "undefined")
992
+ if (item.filterDropdown && item.filterDropdown !== true)
993
993
  return;
994
994
  if (item.options.length < 11) {
995
995
  if (!item.filters)
@@ -1088,7 +1088,7 @@ function Table(props) {
1088
1088
  case "string":
1089
1089
  if (!item.render)
1090
1090
  item.render = (value) => processValue(item, value);
1091
- if (typeof item.filterDropdown === "undefined") {
1091
+ if (item.filterDropdown !== false) {
1092
1092
  if (!item.onFilter)
1093
1093
  item.onFilter = (value, row) => {
1094
1094
  if (!value || lodashEs.isNil(value))
@@ -1097,7 +1097,7 @@ function Table(props) {
1097
1097
  return false;
1098
1098
  return row[item.id].trim().toLowerCase().includes(value.trim().toLowerCase());
1099
1099
  };
1100
- if (!item.filters && item.optionsType !== "auto")
1100
+ if (typeof item.filterDropdown === "undefined" && !item.filters && item.optionsType !== "auto")
1101
1101
  item.filterDropdown = ({
1102
1102
  setSelectedKeys,
1103
1103
  confirm,
@@ -1123,7 +1123,7 @@ function Table(props) {
1123
1123
  case "string[]":
1124
1124
  if (!item.render)
1125
1125
  item.render = (value) => processValue(item, value);
1126
- if (typeof item.filterDropdown === "undefined") {
1126
+ if (item.filterDropdown !== false) {
1127
1127
  if (!item.onFilter)
1128
1128
  item.onFilter = (value, row) => {
1129
1129
  if (value === null && (!row[item.id] || !row[item.id].length))
@@ -1134,7 +1134,7 @@ function Table(props) {
1134
1134
  (v) => v.trim().toLowerCase().includes(value.trim().toLowerCase())
1135
1135
  );
1136
1136
  };
1137
- if (!item.filters && item.optionsType !== "auto")
1137
+ if (typeof item.filterDropdown === "undefined" && !item.filters && item.optionsType !== "auto")
1138
1138
  item.filterDropdown = ({
1139
1139
  setSelectedKeys,
1140
1140
  confirm,
@@ -1162,7 +1162,7 @@ function Table(props) {
1162
1162
  item.render = (value) => processValue(item, value);
1163
1163
  if (typeof item.sorter === "undefined")
1164
1164
  item.sorter = (a, b) => a[item.id] - b[item.id];
1165
- if (typeof item.filterDropdown === "undefined") {
1165
+ if (item.filterDropdown !== false) {
1166
1166
  if (!item.onFilter)
1167
1167
  item.onFilter = (value, row) => {
1168
1168
  if (value === null)
@@ -1171,7 +1171,7 @@ function Table(props) {
1171
1171
  return false;
1172
1172
  return value == row[item.id];
1173
1173
  };
1174
- if (!item.filters)
1174
+ if (typeof item.filterDropdown === "undefined" && !item.filters)
1175
1175
  item.filterDropdown = ({
1176
1176
  setSelectedKeys,
1177
1177
  confirm,
@@ -1197,7 +1197,7 @@ function Table(props) {
1197
1197
  case "number[]":
1198
1198
  if (!item.render)
1199
1199
  item.render = (value) => processValue(item, value).join(", ");
1200
- if (typeof item.filterDropdown === "undefined") {
1200
+ if (item.filterDropdown !== false) {
1201
1201
  if (!item.onFilter)
1202
1202
  item.onFilter = (value, row) => {
1203
1203
  if (value === null && (!row[item.id] || !row[item.id].length))
@@ -1206,7 +1206,7 @@ function Table(props) {
1206
1206
  return false;
1207
1207
  return row[item.id].includes(Number(value));
1208
1208
  };
1209
- if (!item.filters)
1209
+ if (typeof item.filterDropdown === "undefined" && !item.filters)
1210
1210
  item.filterDropdown = ({
1211
1211
  setSelectedKeys,
1212
1212
  confirm,
@@ -1248,52 +1248,53 @@ function Table(props) {
1248
1248
  }
1249
1249
  }
1250
1250
  );
1251
- if (typeof item.filterDropdown === "undefined") {
1252
- item.filterDropdown = ({
1253
- setSelectedKeys,
1254
- selectedKeys,
1255
- confirm
1256
- }) => /* @__PURE__ */ jsxRuntime.jsxs(
1257
- antd.Radio.Group,
1258
- {
1259
- style: { padding: 8 },
1260
- buttonStyle: "solid",
1261
- value: JSON.stringify(selectedKeys[0]),
1262
- onChange: (e) => {
1263
- const Values = {
1264
- true: true,
1265
- false: false,
1266
- null: null
1267
- };
1268
- setSelectedKeys(
1269
- e.target.value ? [Values[e.target.value]] : []
1270
- );
1271
- confirm();
1272
- },
1273
- children: [
1274
- /* @__PURE__ */ jsxRuntime.jsx(antd.Radio.Button, { children: common2.all }),
1275
- /* @__PURE__ */ jsxRuntime.jsx(antd.Radio.Button, { value: "true", children: /* @__PURE__ */ jsxRuntime.jsx(
1276
- icons.CheckOutlined,
1277
- {
1278
- style: {
1279
- color: "#52c41a",
1280
- verticalAlign: "middle"
1251
+ if (item.filterDropdown !== false) {
1252
+ if (typeof item.filterDropdown === "undefined")
1253
+ item.filterDropdown = ({
1254
+ setSelectedKeys,
1255
+ selectedKeys,
1256
+ confirm
1257
+ }) => /* @__PURE__ */ jsxRuntime.jsxs(
1258
+ antd.Radio.Group,
1259
+ {
1260
+ style: { padding: 8 },
1261
+ buttonStyle: "solid",
1262
+ value: JSON.stringify(selectedKeys[0]),
1263
+ onChange: (e) => {
1264
+ const Values = {
1265
+ true: true,
1266
+ false: false,
1267
+ null: null
1268
+ };
1269
+ setSelectedKeys(
1270
+ e.target.value ? [Values[e.target.value]] : []
1271
+ );
1272
+ confirm();
1273
+ },
1274
+ children: [
1275
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Radio.Button, { children: common2.all }),
1276
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Radio.Button, { value: "true", children: /* @__PURE__ */ jsxRuntime.jsx(
1277
+ icons.CheckOutlined,
1278
+ {
1279
+ style: {
1280
+ color: "#52c41a",
1281
+ verticalAlign: "middle"
1282
+ }
1281
1283
  }
1282
- }
1283
- ) }),
1284
- /* @__PURE__ */ jsxRuntime.jsx(antd.Radio.Button, { value: "false", children: /* @__PURE__ */ jsxRuntime.jsx(
1285
- icons.CloseOutlined,
1286
- {
1287
- style: {
1288
- verticalAlign: "middle",
1289
- color: "#ff4d4f"
1284
+ ) }),
1285
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Radio.Button, { value: "false", children: /* @__PURE__ */ jsxRuntime.jsx(
1286
+ icons.CloseOutlined,
1287
+ {
1288
+ style: {
1289
+ verticalAlign: "middle",
1290
+ color: "#ff4d4f"
1291
+ }
1290
1292
  }
1291
- }
1292
- ) }),
1293
- /* @__PURE__ */ jsxRuntime.jsx(antd.Radio.Button, { value: "null", children: common2.blank })
1294
- ]
1295
- }
1296
- );
1293
+ ) }),
1294
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Radio.Button, { value: "null", children: common2.blank })
1295
+ ]
1296
+ }
1297
+ );
1297
1298
  if (!item.onFilter)
1298
1299
  item.onFilter = (value, row) => {
1299
1300
  switch (value) {
@@ -1318,23 +1319,24 @@ function Table(props) {
1318
1319
  return order === "ascend" ? -1 : 1;
1319
1320
  return new Date(a[item.id]).getTime() < new Date(b[item.id]).getTime() ? -1 : 1;
1320
1321
  };
1321
- if (typeof item.filterDropdown === "undefined") {
1322
- item.filterDropdown = ({ setSelectedKeys, confirm }) => /* @__PURE__ */ jsxRuntime.jsx(
1323
- antd.DatePicker.RangePicker,
1324
- {
1325
- onChange: (dates) => {
1326
- setSelectedKeys(
1327
- (dates == null ? void 0 : dates[0]) && dates[1] ? [
1328
- [
1329
- dates[0].startOf("day").toISOString(),
1330
- dates[1].endOf("day").toISOString()
1331
- ]
1332
- ] : []
1333
- );
1334
- confirm();
1322
+ if (item.filterDropdown !== false) {
1323
+ if (typeof item.filterDropdown === "undefined")
1324
+ item.filterDropdown = ({ setSelectedKeys, confirm }) => /* @__PURE__ */ jsxRuntime.jsx(
1325
+ antd.DatePicker.RangePicker,
1326
+ {
1327
+ onChange: (dates) => {
1328
+ setSelectedKeys(
1329
+ (dates == null ? void 0 : dates[0]) && dates[1] ? [
1330
+ [
1331
+ dates[0].startOf("day").toISOString(),
1332
+ dates[1].endOf("day").toISOString()
1333
+ ]
1334
+ ] : []
1335
+ );
1336
+ confirm();
1337
+ }
1335
1338
  }
1336
- }
1337
- );
1339
+ );
1338
1340
  if (!item.onFilter)
1339
1341
  item.onFilter = (value, row) => {
1340
1342
  if (lodashEs.isNil(value[0]))
@@ -1356,23 +1358,24 @@ function Table(props) {
1356
1358
  return order === "ascend" ? -1 : 1;
1357
1359
  return new Date(a[item.id]).getTime() < new Date(b[item.id]).getTime() ? -1 : 1;
1358
1360
  };
1359
- if (typeof item.filterDropdown === "undefined") {
1360
- item.filterDropdown = ({ setSelectedKeys, confirm }) => /* @__PURE__ */ jsxRuntime.jsx(
1361
- antd.DatePicker.RangePicker,
1362
- {
1363
- onChange: (dates) => {
1364
- setSelectedKeys(
1365
- (dates == null ? void 0 : dates[0]) && dates[1] ? [
1366
- [
1367
- dates[0].startOf("day").toISOString(),
1368
- dates[1].endOf("day").toISOString()
1369
- ]
1370
- ] : []
1371
- );
1372
- confirm();
1361
+ if (item.filterDropdown !== false) {
1362
+ if (typeof item.filterDropdown === "undefined")
1363
+ item.filterDropdown = ({ setSelectedKeys, confirm }) => /* @__PURE__ */ jsxRuntime.jsx(
1364
+ antd.DatePicker.RangePicker,
1365
+ {
1366
+ onChange: (dates) => {
1367
+ setSelectedKeys(
1368
+ (dates == null ? void 0 : dates[0]) && dates[1] ? [
1369
+ [
1370
+ dates[0].startOf("day").toISOString(),
1371
+ dates[1].endOf("day").toISOString()
1372
+ ]
1373
+ ] : []
1374
+ );
1375
+ confirm();
1376
+ }
1373
1377
  }
1374
- }
1375
- );
1378
+ );
1376
1379
  if (!item.onFilter)
1377
1380
  item.onFilter = (value, row) => {
1378
1381
  if (lodashEs.isNil(value[0]))
@@ -1409,7 +1412,7 @@ function Table(props) {
1409
1412
  default:
1410
1413
  if (!item.render)
1411
1414
  item.render = (value) => processValue(item, value);
1412
- if (typeof item.filterDropdown === "undefined" && !item.onFilter)
1415
+ if (item.filterDropdown !== false && !item.onFilter)
1413
1416
  item.onFilter = (value, row) => {
1414
1417
  if (value === null && lodashEs.isNil(row[item.id]))
1415
1418
  return true;
@@ -1447,7 +1450,7 @@ function Table(props) {
1447
1450
  antd.Table,
1448
1451
  {
1449
1452
  ...props,
1450
- rowKey: props.rowKey || "id",
1453
+ rowKey: props.rowKey || columns[0].id || "id",
1451
1454
  columns,
1452
1455
  dataSource: props.dataSource
1453
1456
  }
@@ -1504,7 +1507,7 @@ function FaasDataTable({
1504
1507
  {
1505
1508
  ...props,
1506
1509
  loading: props.loading,
1507
- rowKey: props.rowKey || "id",
1510
+ rowKey: props.rowKey || currentColumns[0].id || "id",
1508
1511
  columns: currentColumns,
1509
1512
  dataSource: []
1510
1513
  }
@@ -1515,7 +1518,7 @@ function FaasDataTable({
1515
1518
  {
1516
1519
  ...props,
1517
1520
  loading: props.loading,
1518
- rowKey: props.rowKey || "id",
1521
+ rowKey: props.rowKey || currentColumns[0].id || "id",
1519
1522
  columns: currentColumns,
1520
1523
  dataSource: data
1521
1524
  }
@@ -1525,7 +1528,7 @@ function FaasDataTable({
1525
1528
  {
1526
1529
  ...props,
1527
1530
  loading: props.loading,
1528
- rowKey: props.rowKey || "id",
1531
+ rowKey: props.rowKey || currentColumns[0].id || "id",
1529
1532
  columns: currentColumns,
1530
1533
  dataSource: data.rows,
1531
1534
  pagination: {
package/dist/index.mjs CHANGED
@@ -986,7 +986,7 @@ function Table(props) {
986
986
  const [columns, setColumns] = useState();
987
987
  const { common: common2 } = useConfigContext();
988
988
  const generateFilterDropdown = (item) => {
989
- if (typeof item.filterDropdown !== "undefined")
989
+ if (item.filterDropdown && item.filterDropdown !== true)
990
990
  return;
991
991
  if (item.options.length < 11) {
992
992
  if (!item.filters)
@@ -1085,7 +1085,7 @@ function Table(props) {
1085
1085
  case "string":
1086
1086
  if (!item.render)
1087
1087
  item.render = (value) => processValue(item, value);
1088
- if (typeof item.filterDropdown === "undefined") {
1088
+ if (item.filterDropdown !== false) {
1089
1089
  if (!item.onFilter)
1090
1090
  item.onFilter = (value, row) => {
1091
1091
  if (!value || isNil(value))
@@ -1094,7 +1094,7 @@ function Table(props) {
1094
1094
  return false;
1095
1095
  return row[item.id].trim().toLowerCase().includes(value.trim().toLowerCase());
1096
1096
  };
1097
- if (!item.filters && item.optionsType !== "auto")
1097
+ if (typeof item.filterDropdown === "undefined" && !item.filters && item.optionsType !== "auto")
1098
1098
  item.filterDropdown = ({
1099
1099
  setSelectedKeys,
1100
1100
  confirm,
@@ -1120,7 +1120,7 @@ function Table(props) {
1120
1120
  case "string[]":
1121
1121
  if (!item.render)
1122
1122
  item.render = (value) => processValue(item, value);
1123
- if (typeof item.filterDropdown === "undefined") {
1123
+ if (item.filterDropdown !== false) {
1124
1124
  if (!item.onFilter)
1125
1125
  item.onFilter = (value, row) => {
1126
1126
  if (value === null && (!row[item.id] || !row[item.id].length))
@@ -1131,7 +1131,7 @@ function Table(props) {
1131
1131
  (v) => v.trim().toLowerCase().includes(value.trim().toLowerCase())
1132
1132
  );
1133
1133
  };
1134
- if (!item.filters && item.optionsType !== "auto")
1134
+ if (typeof item.filterDropdown === "undefined" && !item.filters && item.optionsType !== "auto")
1135
1135
  item.filterDropdown = ({
1136
1136
  setSelectedKeys,
1137
1137
  confirm,
@@ -1159,7 +1159,7 @@ function Table(props) {
1159
1159
  item.render = (value) => processValue(item, value);
1160
1160
  if (typeof item.sorter === "undefined")
1161
1161
  item.sorter = (a, b) => a[item.id] - b[item.id];
1162
- if (typeof item.filterDropdown === "undefined") {
1162
+ if (item.filterDropdown !== false) {
1163
1163
  if (!item.onFilter)
1164
1164
  item.onFilter = (value, row) => {
1165
1165
  if (value === null)
@@ -1168,7 +1168,7 @@ function Table(props) {
1168
1168
  return false;
1169
1169
  return value == row[item.id];
1170
1170
  };
1171
- if (!item.filters)
1171
+ if (typeof item.filterDropdown === "undefined" && !item.filters)
1172
1172
  item.filterDropdown = ({
1173
1173
  setSelectedKeys,
1174
1174
  confirm,
@@ -1194,7 +1194,7 @@ function Table(props) {
1194
1194
  case "number[]":
1195
1195
  if (!item.render)
1196
1196
  item.render = (value) => processValue(item, value).join(", ");
1197
- if (typeof item.filterDropdown === "undefined") {
1197
+ if (item.filterDropdown !== false) {
1198
1198
  if (!item.onFilter)
1199
1199
  item.onFilter = (value, row) => {
1200
1200
  if (value === null && (!row[item.id] || !row[item.id].length))
@@ -1203,7 +1203,7 @@ function Table(props) {
1203
1203
  return false;
1204
1204
  return row[item.id].includes(Number(value));
1205
1205
  };
1206
- if (!item.filters)
1206
+ if (typeof item.filterDropdown === "undefined" && !item.filters)
1207
1207
  item.filterDropdown = ({
1208
1208
  setSelectedKeys,
1209
1209
  confirm,
@@ -1245,52 +1245,53 @@ function Table(props) {
1245
1245
  }
1246
1246
  }
1247
1247
  );
1248
- if (typeof item.filterDropdown === "undefined") {
1249
- item.filterDropdown = ({
1250
- setSelectedKeys,
1251
- selectedKeys,
1252
- confirm
1253
- }) => /* @__PURE__ */ jsxs(
1254
- Radio.Group,
1255
- {
1256
- style: { padding: 8 },
1257
- buttonStyle: "solid",
1258
- value: JSON.stringify(selectedKeys[0]),
1259
- onChange: (e) => {
1260
- const Values = {
1261
- true: true,
1262
- false: false,
1263
- null: null
1264
- };
1265
- setSelectedKeys(
1266
- e.target.value ? [Values[e.target.value]] : []
1267
- );
1268
- confirm();
1269
- },
1270
- children: [
1271
- /* @__PURE__ */ jsx(Radio.Button, { children: common2.all }),
1272
- /* @__PURE__ */ jsx(Radio.Button, { value: "true", children: /* @__PURE__ */ jsx(
1273
- CheckOutlined,
1274
- {
1275
- style: {
1276
- color: "#52c41a",
1277
- verticalAlign: "middle"
1248
+ if (item.filterDropdown !== false) {
1249
+ if (typeof item.filterDropdown === "undefined")
1250
+ item.filterDropdown = ({
1251
+ setSelectedKeys,
1252
+ selectedKeys,
1253
+ confirm
1254
+ }) => /* @__PURE__ */ jsxs(
1255
+ Radio.Group,
1256
+ {
1257
+ style: { padding: 8 },
1258
+ buttonStyle: "solid",
1259
+ value: JSON.stringify(selectedKeys[0]),
1260
+ onChange: (e) => {
1261
+ const Values = {
1262
+ true: true,
1263
+ false: false,
1264
+ null: null
1265
+ };
1266
+ setSelectedKeys(
1267
+ e.target.value ? [Values[e.target.value]] : []
1268
+ );
1269
+ confirm();
1270
+ },
1271
+ children: [
1272
+ /* @__PURE__ */ jsx(Radio.Button, { children: common2.all }),
1273
+ /* @__PURE__ */ jsx(Radio.Button, { value: "true", children: /* @__PURE__ */ jsx(
1274
+ CheckOutlined,
1275
+ {
1276
+ style: {
1277
+ color: "#52c41a",
1278
+ verticalAlign: "middle"
1279
+ }
1278
1280
  }
1279
- }
1280
- ) }),
1281
- /* @__PURE__ */ jsx(Radio.Button, { value: "false", children: /* @__PURE__ */ jsx(
1282
- CloseOutlined,
1283
- {
1284
- style: {
1285
- verticalAlign: "middle",
1286
- color: "#ff4d4f"
1281
+ ) }),
1282
+ /* @__PURE__ */ jsx(Radio.Button, { value: "false", children: /* @__PURE__ */ jsx(
1283
+ CloseOutlined,
1284
+ {
1285
+ style: {
1286
+ verticalAlign: "middle",
1287
+ color: "#ff4d4f"
1288
+ }
1287
1289
  }
1288
- }
1289
- ) }),
1290
- /* @__PURE__ */ jsx(Radio.Button, { value: "null", children: common2.blank })
1291
- ]
1292
- }
1293
- );
1290
+ ) }),
1291
+ /* @__PURE__ */ jsx(Radio.Button, { value: "null", children: common2.blank })
1292
+ ]
1293
+ }
1294
+ );
1294
1295
  if (!item.onFilter)
1295
1296
  item.onFilter = (value, row) => {
1296
1297
  switch (value) {
@@ -1315,23 +1316,24 @@ function Table(props) {
1315
1316
  return order === "ascend" ? -1 : 1;
1316
1317
  return new Date(a[item.id]).getTime() < new Date(b[item.id]).getTime() ? -1 : 1;
1317
1318
  };
1318
- if (typeof item.filterDropdown === "undefined") {
1319
- item.filterDropdown = ({ setSelectedKeys, confirm }) => /* @__PURE__ */ jsx(
1320
- DatePicker.RangePicker,
1321
- {
1322
- onChange: (dates) => {
1323
- setSelectedKeys(
1324
- (dates == null ? void 0 : dates[0]) && dates[1] ? [
1325
- [
1326
- dates[0].startOf("day").toISOString(),
1327
- dates[1].endOf("day").toISOString()
1328
- ]
1329
- ] : []
1330
- );
1331
- confirm();
1319
+ if (item.filterDropdown !== false) {
1320
+ if (typeof item.filterDropdown === "undefined")
1321
+ item.filterDropdown = ({ setSelectedKeys, confirm }) => /* @__PURE__ */ jsx(
1322
+ DatePicker.RangePicker,
1323
+ {
1324
+ onChange: (dates) => {
1325
+ setSelectedKeys(
1326
+ (dates == null ? void 0 : dates[0]) && dates[1] ? [
1327
+ [
1328
+ dates[0].startOf("day").toISOString(),
1329
+ dates[1].endOf("day").toISOString()
1330
+ ]
1331
+ ] : []
1332
+ );
1333
+ confirm();
1334
+ }
1332
1335
  }
1333
- }
1334
- );
1336
+ );
1335
1337
  if (!item.onFilter)
1336
1338
  item.onFilter = (value, row) => {
1337
1339
  if (isNil(value[0]))
@@ -1353,23 +1355,24 @@ function Table(props) {
1353
1355
  return order === "ascend" ? -1 : 1;
1354
1356
  return new Date(a[item.id]).getTime() < new Date(b[item.id]).getTime() ? -1 : 1;
1355
1357
  };
1356
- if (typeof item.filterDropdown === "undefined") {
1357
- item.filterDropdown = ({ setSelectedKeys, confirm }) => /* @__PURE__ */ jsx(
1358
- DatePicker.RangePicker,
1359
- {
1360
- onChange: (dates) => {
1361
- setSelectedKeys(
1362
- (dates == null ? void 0 : dates[0]) && dates[1] ? [
1363
- [
1364
- dates[0].startOf("day").toISOString(),
1365
- dates[1].endOf("day").toISOString()
1366
- ]
1367
- ] : []
1368
- );
1369
- confirm();
1358
+ if (item.filterDropdown !== false) {
1359
+ if (typeof item.filterDropdown === "undefined")
1360
+ item.filterDropdown = ({ setSelectedKeys, confirm }) => /* @__PURE__ */ jsx(
1361
+ DatePicker.RangePicker,
1362
+ {
1363
+ onChange: (dates) => {
1364
+ setSelectedKeys(
1365
+ (dates == null ? void 0 : dates[0]) && dates[1] ? [
1366
+ [
1367
+ dates[0].startOf("day").toISOString(),
1368
+ dates[1].endOf("day").toISOString()
1369
+ ]
1370
+ ] : []
1371
+ );
1372
+ confirm();
1373
+ }
1370
1374
  }
1371
- }
1372
- );
1375
+ );
1373
1376
  if (!item.onFilter)
1374
1377
  item.onFilter = (value, row) => {
1375
1378
  if (isNil(value[0]))
@@ -1406,7 +1409,7 @@ function Table(props) {
1406
1409
  default:
1407
1410
  if (!item.render)
1408
1411
  item.render = (value) => processValue(item, value);
1409
- if (typeof item.filterDropdown === "undefined" && !item.onFilter)
1412
+ if (item.filterDropdown !== false && !item.onFilter)
1410
1413
  item.onFilter = (value, row) => {
1411
1414
  if (value === null && isNil(row[item.id]))
1412
1415
  return true;
@@ -1444,7 +1447,7 @@ function Table(props) {
1444
1447
  Table$1,
1445
1448
  {
1446
1449
  ...props,
1447
- rowKey: props.rowKey || "id",
1450
+ rowKey: props.rowKey || columns[0].id || "id",
1448
1451
  columns,
1449
1452
  dataSource: props.dataSource
1450
1453
  }
@@ -1501,7 +1504,7 @@ function FaasDataTable({
1501
1504
  {
1502
1505
  ...props,
1503
1506
  loading: props.loading,
1504
- rowKey: props.rowKey || "id",
1507
+ rowKey: props.rowKey || currentColumns[0].id || "id",
1505
1508
  columns: currentColumns,
1506
1509
  dataSource: []
1507
1510
  }
@@ -1512,7 +1515,7 @@ function FaasDataTable({
1512
1515
  {
1513
1516
  ...props,
1514
1517
  loading: props.loading,
1515
- rowKey: props.rowKey || "id",
1518
+ rowKey: props.rowKey || currentColumns[0].id || "id",
1516
1519
  columns: currentColumns,
1517
1520
  dataSource: data
1518
1521
  }
@@ -1522,7 +1525,7 @@ function FaasDataTable({
1522
1525
  {
1523
1526
  ...props,
1524
1527
  loading: props.loading,
1525
- rowKey: props.rowKey || "id",
1528
+ rowKey: props.rowKey || currentColumns[0].id || "id",
1526
1529
  columns: currentColumns,
1527
1530
  dataSource: data.rows,
1528
1531
  pagination: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "0.0.4-beta.13",
3
+ "version": "0.0.4-beta.14",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -26,7 +26,7 @@
26
26
  "lodash-es": "*"
27
27
  },
28
28
  "peerDependencies": {
29
- "@faasjs/react": "0.0.4-beta.13",
29
+ "@faasjs/react": "0.0.4-beta.14",
30
30
  "antd": "*",
31
31
  "react": "*",
32
32
  "react-dom": "*",
@@ -37,7 +37,7 @@
37
37
  "@testing-library/jest-dom": "*",
38
38
  "@testing-library/react": "*",
39
39
  "@testing-library/user-event": "*",
40
- "@faasjs/react": "0.0.4-beta.13",
40
+ "@faasjs/react": "0.0.4-beta.14",
41
41
  "antd": "*",
42
42
  "react": "*",
43
43
  "react-dom": "*",