@faasjs/ant-design 0.0.3-beta.50 → 0.0.3-beta.52

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
@@ -1182,7 +1182,7 @@ function Table(props) {
1182
1182
  item.onFilter = (value, row) => {
1183
1183
  if (value === null && (0, import_lodash_es6.isNil)(row[item.id]))
1184
1184
  return true;
1185
- if (!row[item.id])
1185
+ if (!row[item.id] || !value)
1186
1186
  return false;
1187
1187
  return row[item.id].toLowerCase().includes(value.toLowerCase());
1188
1188
  };
@@ -1318,7 +1318,12 @@ function Table(props) {
1318
1318
  buttonStyle: "solid",
1319
1319
  value: selectedKeys[0],
1320
1320
  onChange: (e) => {
1321
- setSelectedKeys(e.target.value ? [e.target.value] : []);
1321
+ const Values = {
1322
+ true: true,
1323
+ false: false,
1324
+ null: null
1325
+ };
1326
+ setSelectedKeys(e.target.value ? [Values[e.target.value]] : []);
1322
1327
  confirm();
1323
1328
  },
1324
1329
  children: [
@@ -1326,7 +1331,7 @@ function Table(props) {
1326
1331
  children: common2.all
1327
1332
  }),
1328
1333
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd11.Radio.Button, {
1329
- value: true,
1334
+ value: "true",
1330
1335
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons3.CheckOutlined, {
1331
1336
  style: {
1332
1337
  color: "#52c41a",
@@ -1335,7 +1340,7 @@ function Table(props) {
1335
1340
  })
1336
1341
  }),
1337
1342
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd11.Radio.Button, {
1338
- value: false,
1343
+ value: "false",
1339
1344
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons3.CloseOutlined, {
1340
1345
  style: {
1341
1346
  verticalAlign: "middle",
@@ -1344,7 +1349,7 @@ function Table(props) {
1344
1349
  })
1345
1350
  }),
1346
1351
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd11.Radio.Button, {
1347
- value: null,
1352
+ value: "null",
1348
1353
  children: common2.blank
1349
1354
  })
1350
1355
  ]
@@ -1353,13 +1358,11 @@ function Table(props) {
1353
1358
  item.onFilter = (value, row) => {
1354
1359
  switch (value) {
1355
1360
  case true:
1356
- return !(0, import_lodash_es6.isNil)(row[item.id]) && !!row[item.id];
1361
+ return !(0, import_lodash_es6.isNil)(row[item.id]) && row[item.id] !== false;
1357
1362
  case false:
1358
1363
  return !(0, import_lodash_es6.isNil)(row[item.id]) && !row[item.id];
1359
- case null:
1360
- return (0, import_lodash_es6.isNil)(row[item.id]);
1361
1364
  default:
1362
- return true;
1365
+ return (0, import_lodash_es6.isNil)(row[item.id]);
1363
1366
  }
1364
1367
  };
1365
1368
  break;
package/dist/index.mjs CHANGED
@@ -1182,7 +1182,7 @@ function Table(props) {
1182
1182
  item.onFilter = (value, row) => {
1183
1183
  if (value === null && isNil2(row[item.id]))
1184
1184
  return true;
1185
- if (!row[item.id])
1185
+ if (!row[item.id] || !value)
1186
1186
  return false;
1187
1187
  return row[item.id].toLowerCase().includes(value.toLowerCase());
1188
1188
  };
@@ -1318,7 +1318,12 @@ function Table(props) {
1318
1318
  buttonStyle: "solid",
1319
1319
  value: selectedKeys[0],
1320
1320
  onChange: (e) => {
1321
- setSelectedKeys(e.target.value ? [e.target.value] : []);
1321
+ const Values = {
1322
+ true: true,
1323
+ false: false,
1324
+ null: null
1325
+ };
1326
+ setSelectedKeys(e.target.value ? [Values[e.target.value]] : []);
1322
1327
  confirm();
1323
1328
  },
1324
1329
  children: [
@@ -1326,7 +1331,7 @@ function Table(props) {
1326
1331
  children: common2.all
1327
1332
  }),
1328
1333
  /* @__PURE__ */ jsx13(Radio.Button, {
1329
- value: true,
1334
+ value: "true",
1330
1335
  children: /* @__PURE__ */ jsx13(CheckOutlined2, {
1331
1336
  style: {
1332
1337
  color: "#52c41a",
@@ -1335,7 +1340,7 @@ function Table(props) {
1335
1340
  })
1336
1341
  }),
1337
1342
  /* @__PURE__ */ jsx13(Radio.Button, {
1338
- value: false,
1343
+ value: "false",
1339
1344
  children: /* @__PURE__ */ jsx13(CloseOutlined2, {
1340
1345
  style: {
1341
1346
  verticalAlign: "middle",
@@ -1344,7 +1349,7 @@ function Table(props) {
1344
1349
  })
1345
1350
  }),
1346
1351
  /* @__PURE__ */ jsx13(Radio.Button, {
1347
- value: null,
1352
+ value: "null",
1348
1353
  children: common2.blank
1349
1354
  })
1350
1355
  ]
@@ -1353,13 +1358,11 @@ function Table(props) {
1353
1358
  item.onFilter = (value, row) => {
1354
1359
  switch (value) {
1355
1360
  case true:
1356
- return !isNil2(row[item.id]) && !!row[item.id];
1361
+ return !isNil2(row[item.id]) && row[item.id] !== false;
1357
1362
  case false:
1358
1363
  return !isNil2(row[item.id]) && !row[item.id];
1359
- case null:
1360
- return isNil2(row[item.id]);
1361
1364
  default:
1362
- return true;
1365
+ return isNil2(row[item.id]);
1363
1366
  }
1364
1367
  };
1365
1368
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "0.0.3-beta.50",
3
+ "version": "0.0.3-beta.52",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",