@faasjs/ant-design 8.0.0-beta.20 → 8.0.0-beta.21

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.
Files changed (2) hide show
  1. package/dist/index.mjs +13 -25
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -1855,34 +1855,22 @@ function FaasDataTable({ props, columns, data, params, reload, loading }) {
1855
1855
  if (!data || Array.isArray(data)) return;
1856
1856
  setCurrentColumns((prev) => {
1857
1857
  const newColumns = [...prev];
1858
- for (const column of newColumns) {
1859
- if (data.options?.[column.id]) {
1860
- column.options = transferOptions(data.options[column.id]);
1861
- column.filters = column.options.map((v) => ({
1862
- text: v.label,
1863
- value: v.value
1864
- })).concat({
1865
- text: /* @__PURE__ */ jsx(Blank, {}),
1866
- value: null
1867
- });
1868
- column.render = (value) => processValue(column, value);
1869
- if (column.filterDropdown) delete column.filterDropdown;
1870
- continue;
1871
- }
1872
- if (column.optionsType === "auto" && !column.options && !column.filters) {
1873
- const filters = uniqBy(props.dataSource, column.id).map((v) => ({
1874
- text: v[column.id],
1875
- value: v[column.id]
1876
- }));
1877
- if (filters.length) column.filters = filters.concat({
1878
- text: /* @__PURE__ */ jsx(Blank, {}),
1879
- value: null
1880
- });
1881
- }
1858
+ for (const column of newColumns) if (data.options?.[column.id]) {
1859
+ column.options = transferOptions(data.options[column.id]);
1860
+ column.filters = column.options.map((v) => ({
1861
+ text: v.label,
1862
+ value: v.value
1863
+ })).concat({
1864
+ text: /* @__PURE__ */ jsx(Blank, {}),
1865
+ value: null
1866
+ });
1867
+ column.render = (value) => processValue(column, value);
1868
+ if (column.filterDropdown) delete column.filterDropdown;
1869
+ continue;
1882
1870
  }
1883
1871
  return newColumns;
1884
1872
  });
1885
- }, [data, props.dataSource]);
1873
+ }, [data]);
1886
1874
  if (!data) return /* @__PURE__ */ jsx(Table$1, {
1887
1875
  ...props,
1888
1876
  ...typeof loading === "undefined" ? {} : { loading },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "8.0.0-beta.20",
3
+ "version": "8.0.0-beta.21",
4
4
  "homepage": "https://faasjs.com/doc/ant-design",
5
5
  "bugs": {
6
6
  "url": "https://github.com/faasjs/faasjs/issues"
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@ant-design/icons": "*",
30
- "@faasjs/react": ">=8.0.0-beta.20",
30
+ "@faasjs/react": ">=8.0.0-beta.21",
31
31
  "@types/lodash-es": "*",
32
32
  "@types/react": "^19.0.0",
33
33
  "@types/react-dom": "^19.0.0",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@ant-design/icons": "*",
42
- "@faasjs/react": ">=8.0.0-beta.20",
42
+ "@faasjs/react": ">=8.0.0-beta.21",
43
43
  "antd": "^6.0.0",
44
44
  "lodash-es": "*",
45
45
  "react": "^19.0.0",