Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(table): 修复revalidateOnFocus的代码实现与文档注释不符 #8159

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading