@faasjs/ant-design 1.7.1 → 2.0.0

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
@@ -1163,7 +1163,7 @@ function Table(props) {
1163
1163
  if (!item.render)
1164
1164
  item.render = (value) => processValue(item, value);
1165
1165
  if (item.filterDropdown !== false) {
1166
- if (!item.onFilter)
1166
+ if (!item.onFilter && !props.faasData)
1167
1167
  item.onFilter = (value, row) => {
1168
1168
  if (!value || lodashEs.isNil(value))
1169
1169
  return true;
@@ -1198,7 +1198,7 @@ function Table(props) {
1198
1198
  if (!item.render)
1199
1199
  item.render = (value) => processValue(item, value);
1200
1200
  if (item.filterDropdown !== false) {
1201
- if (!item.onFilter)
1201
+ if (!item.onFilter && !props.faasData)
1202
1202
  item.onFilter = (value, row) => {
1203
1203
  if (value === null && (!row[item.id] || !row[item.id].length))
1204
1204
  return true;
@@ -1237,7 +1237,7 @@ function Table(props) {
1237
1237
  if (typeof item.sorter === "undefined")
1238
1238
  item.sorter = (a, b) => a[item.id] - b[item.id];
1239
1239
  if (item.filterDropdown !== false) {
1240
- if (!item.onFilter)
1240
+ if (!item.onFilter && !props.faasData)
1241
1241
  item.onFilter = (value, row) => {
1242
1242
  if (value === null)
1243
1243
  return true;
@@ -1272,7 +1272,7 @@ function Table(props) {
1272
1272
  if (!item.render)
1273
1273
  item.render = (value) => processValue(item, value).join(", ");
1274
1274
  if (item.filterDropdown !== false) {
1275
- if (!item.onFilter)
1275
+ if (!item.onFilter && !props.faasData)
1276
1276
  item.onFilter = (value, row) => {
1277
1277
  if (value === null && (!row[item.id] || !row[item.id].length))
1278
1278
  return true;
@@ -1369,7 +1369,7 @@ function Table(props) {
1369
1369
  ]
1370
1370
  }
1371
1371
  );
1372
- if (!item.onFilter)
1372
+ if (!item.onFilter && !props.faasData)
1373
1373
  item.onFilter = (value, row) => {
1374
1374
  switch (value) {
1375
1375
  case true:
@@ -1411,7 +1411,7 @@ function Table(props) {
1411
1411
  }
1412
1412
  }
1413
1413
  );
1414
- if (!item.onFilter)
1414
+ if (!item.onFilter && !props.faasData)
1415
1415
  item.onFilter = (value, row) => {
1416
1416
  if (lodashEs.isNil(value[0]))
1417
1417
  return true;
@@ -1451,7 +1451,7 @@ function Table(props) {
1451
1451
  }
1452
1452
  }
1453
1453
  );
1454
- if (!item.onFilter)
1454
+ if (!item.onFilter && !props.faasData)
1455
1455
  item.onFilter = (value, row) => {
1456
1456
  if (lodashEs.isNil(value[0]))
1457
1457
  return true;
@@ -1487,7 +1487,7 @@ function Table(props) {
1487
1487
  default:
1488
1488
  if (!item.render)
1489
1489
  item.render = (value) => processValue(item, value);
1490
- if (item.filterDropdown !== false && !item.onFilter)
1490
+ if (item.filterDropdown !== false && !item.onFilter && !props.faasData)
1491
1491
  item.onFilter = (value, row) => {
1492
1492
  if (value === null && lodashEs.isNil(row[item.id]))
1493
1493
  return true;
@@ -1537,7 +1537,8 @@ function FaasDataTable({
1537
1537
  columns,
1538
1538
  data,
1539
1539
  params,
1540
- reload
1540
+ reload,
1541
+ loading
1541
1542
  }) {
1542
1543
  const [currentColumns, setCurrentColumns] = react$1.useState(columns);
1543
1544
  react$1.useEffect(() => {
@@ -1581,7 +1582,7 @@ function FaasDataTable({
1581
1582
  antd.Table,
1582
1583
  {
1583
1584
  ...props,
1584
- loading: props.loading,
1585
+ loading,
1585
1586
  rowKey: props.rowKey || "id",
1586
1587
  columns: currentColumns,
1587
1588
  dataSource: []
@@ -1592,7 +1593,7 @@ function FaasDataTable({
1592
1593
  antd.Table,
1593
1594
  {
1594
1595
  ...props,
1595
- loading: props.loading,
1596
+ loading,
1596
1597
  rowKey: props.rowKey || "id",
1597
1598
  columns: currentColumns,
1598
1599
  dataSource: data
@@ -1602,7 +1603,7 @@ function FaasDataTable({
1602
1603
  antd.Table,
1603
1604
  {
1604
1605
  ...props,
1605
- loading: props.loading,
1606
+ loading,
1606
1607
  rowKey: props.rowKey || "id",
1607
1608
  columns: currentColumns,
1608
1609
  dataSource: data.rows,
package/dist/index.mjs CHANGED
@@ -1159,7 +1159,7 @@ function Table(props) {
1159
1159
  if (!item.render)
1160
1160
  item.render = (value) => processValue(item, value);
1161
1161
  if (item.filterDropdown !== false) {
1162
- if (!item.onFilter)
1162
+ if (!item.onFilter && !props.faasData)
1163
1163
  item.onFilter = (value, row) => {
1164
1164
  if (!value || isNil(value))
1165
1165
  return true;
@@ -1194,7 +1194,7 @@ function Table(props) {
1194
1194
  if (!item.render)
1195
1195
  item.render = (value) => processValue(item, value);
1196
1196
  if (item.filterDropdown !== false) {
1197
- if (!item.onFilter)
1197
+ if (!item.onFilter && !props.faasData)
1198
1198
  item.onFilter = (value, row) => {
1199
1199
  if (value === null && (!row[item.id] || !row[item.id].length))
1200
1200
  return true;
@@ -1233,7 +1233,7 @@ function Table(props) {
1233
1233
  if (typeof item.sorter === "undefined")
1234
1234
  item.sorter = (a, b) => a[item.id] - b[item.id];
1235
1235
  if (item.filterDropdown !== false) {
1236
- if (!item.onFilter)
1236
+ if (!item.onFilter && !props.faasData)
1237
1237
  item.onFilter = (value, row) => {
1238
1238
  if (value === null)
1239
1239
  return true;
@@ -1268,7 +1268,7 @@ function Table(props) {
1268
1268
  if (!item.render)
1269
1269
  item.render = (value) => processValue(item, value).join(", ");
1270
1270
  if (item.filterDropdown !== false) {
1271
- if (!item.onFilter)
1271
+ if (!item.onFilter && !props.faasData)
1272
1272
  item.onFilter = (value, row) => {
1273
1273
  if (value === null && (!row[item.id] || !row[item.id].length))
1274
1274
  return true;
@@ -1365,7 +1365,7 @@ function Table(props) {
1365
1365
  ]
1366
1366
  }
1367
1367
  );
1368
- if (!item.onFilter)
1368
+ if (!item.onFilter && !props.faasData)
1369
1369
  item.onFilter = (value, row) => {
1370
1370
  switch (value) {
1371
1371
  case true:
@@ -1407,7 +1407,7 @@ function Table(props) {
1407
1407
  }
1408
1408
  }
1409
1409
  );
1410
- if (!item.onFilter)
1410
+ if (!item.onFilter && !props.faasData)
1411
1411
  item.onFilter = (value, row) => {
1412
1412
  if (isNil(value[0]))
1413
1413
  return true;
@@ -1447,7 +1447,7 @@ function Table(props) {
1447
1447
  }
1448
1448
  }
1449
1449
  );
1450
- if (!item.onFilter)
1450
+ if (!item.onFilter && !props.faasData)
1451
1451
  item.onFilter = (value, row) => {
1452
1452
  if (isNil(value[0]))
1453
1453
  return true;
@@ -1483,7 +1483,7 @@ function Table(props) {
1483
1483
  default:
1484
1484
  if (!item.render)
1485
1485
  item.render = (value) => processValue(item, value);
1486
- if (item.filterDropdown !== false && !item.onFilter)
1486
+ if (item.filterDropdown !== false && !item.onFilter && !props.faasData)
1487
1487
  item.onFilter = (value, row) => {
1488
1488
  if (value === null && isNil(row[item.id]))
1489
1489
  return true;
@@ -1533,7 +1533,8 @@ function FaasDataTable({
1533
1533
  columns,
1534
1534
  data,
1535
1535
  params,
1536
- reload
1536
+ reload,
1537
+ loading
1537
1538
  }) {
1538
1539
  const [currentColumns, setCurrentColumns] = useState(columns);
1539
1540
  useEffect(() => {
@@ -1577,7 +1578,7 @@ function FaasDataTable({
1577
1578
  Table$1,
1578
1579
  {
1579
1580
  ...props,
1580
- loading: props.loading,
1581
+ loading,
1581
1582
  rowKey: props.rowKey || "id",
1582
1583
  columns: currentColumns,
1583
1584
  dataSource: []
@@ -1588,7 +1589,7 @@ function FaasDataTable({
1588
1589
  Table$1,
1589
1590
  {
1590
1591
  ...props,
1591
- loading: props.loading,
1592
+ loading,
1592
1593
  rowKey: props.rowKey || "id",
1593
1594
  columns: currentColumns,
1594
1595
  dataSource: data
@@ -1598,7 +1599,7 @@ function FaasDataTable({
1598
1599
  Table$1,
1599
1600
  {
1600
1601
  ...props,
1601
- loading: props.loading,
1602
+ loading,
1602
1603
  rowKey: props.rowKey || "id",
1603
1604
  columns: currentColumns,
1604
1605
  dataSource: data.rows,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "1.7.1",
3
+ "version": "2.0.0",
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": "1.7.1",
29
+ "@faasjs/react": "2.0.0",
30
30
  "antd": "*",
31
31
  "react": "*",
32
32
  "react-dom": "*",
@@ -38,7 +38,7 @@
38
38
  "@testing-library/react": "*",
39
39
  "@testing-library/user-event": "*",
40
40
  "@welldone-software/why-did-you-render": "*",
41
- "@faasjs/react": "1.7.1",
41
+ "@faasjs/react": "2.0.0",
42
42
  "antd": "*",
43
43
  "react": "*",
44
44
  "react-dom": "*",