@jswork/antd-components 1.0.159 → 1.0.161

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jswork/antd-components",
3
- "version": "1.0.159",
3
+ "version": "1.0.161",
4
4
  "main": "dist/main.cjs.js",
5
5
  "module": "dist/main.esm.js",
6
6
  "types": "dist/main.d.ts",
package/src/lib/table.tsx CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Author: aric 1290657123@qq.com
3
3
  * @Date: 2025-10-03 07:11:26
4
4
  * @LastEditors: aric.zheng 1290657123@qq.com
5
- * @LastEditTime: 2025-10-29 08:14:01
5
+ * @LastEditTime: 2025-10-29 10:45:59
6
6
  *
7
7
  *
8
8
  * 路由风格: /{module}/{name} eg: /admin/staff-roles
@@ -17,6 +17,7 @@ import React from 'react';
17
17
  import nx from '@jswork/next';
18
18
  import '@jswork/next-create-fetcher';
19
19
  import { tableAction } from './table-links';
20
+ import deepEqual from 'fast-deep-equal';
20
21
 
21
22
  type NavigateFunction = import('react-router-dom').NavigateFunction;
22
23
 
@@ -207,6 +208,14 @@ export class AcTable extends React.Component<AcTableProps, AcTableState> {
207
208
  await this.fetchData(current, pageSize);
208
209
  }
209
210
 
211
+ // params update
212
+ async componentDidUpdate(prevProps: AcTableProps) {
213
+ const { params } = this.props;
214
+ if (!deepEqual(prevProps.params, params)) {
215
+ void this.refetch();
216
+ }
217
+ }
218
+
210
219
  componentWillUnmount() {
211
220
  this.harmonyEvents?.destroy();
212
221
  this.sync.cancel();