Skip to content

Commit

Permalink
docs(table): 修复revalidateOnFocus的代码实现与文档注释不符 (#8159)
Browse files Browse the repository at this point in the history
  • Loading branch information
liujiayii authored Feb 21, 2024
1 parent 3920e86 commit 8984562
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/table/src/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ const ProTable = <
});
// ============================ END ============================

/** 默认聚焦的时候重新请求数据,这样可以保证数据都是最新的。 */
/** 聚焦的时候重新请求数据,这样可以保证数据都是最新的。 */
useEffect(() => {
// 手动模式和 request 为空都不生效
if (
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/components/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ProTable 在 antd 的 Table 上进行了一层封装,支持了一些预设,
| cardBordered | Table 和 Search 外围 Card 组件的边框 | `boolean \| {search?: boolean, table?: boolean}` | false |
| ghost | 幽灵模式,即是否取消表格区域的 padding | `boolean` | false |
| debounceTime | 防抖时间 | `number` | 10 |
| revalidateOnFocus | 窗口聚焦时自动重新请求 | `boolean` | `true` |
| revalidateOnFocus | 窗口聚焦时自动重新请求 | `boolean` | `false` |
| columnsState | 受控的列状态,可以操作显示隐藏 | `ColumnStateType` | - |
| ErrorBoundary | 自带了错误处理功能,防止白屏,`ErrorBoundary=false` 关闭默认错误边界 | `ReactNode` | 内置 ErrorBoundary |

Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/typing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export type ProTableProps<DataSource, U, ValueType = 'text'> = {
/**
* 只在request 存在的时候生效,可编辑表格也不会生效
*
* @default true
* @default false
* @name 窗口聚焦时自动重新请求
*/
revalidateOnFocus?: boolean;
Expand Down

0 comments on commit 8984562

Please sign in to comment.