Skip to content

Commit

Permalink
fix(table): if request is null,pageSize change no set datasoucre (#2482)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Apr 14, 2021
1 parent 2bc9834 commit 8ea20ab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/table/src/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,10 @@ const ProTable = <T extends Record<string, any>, U extends ParamsType, ValueType
action.setPageInfo({ pageSize, current });
return;
}
// 清空数据,然后刷新不然可能会导致 pageSize 没有数据多
action.setDataSource([]);

// 通过request的时候清空数据,然后刷新不然可能会导致 pageSize 没有数据多
if (request) action.setDataSource([]);

requestAnimationFrame(() => {
action.setPageInfo({
pageSize,
Expand Down

0 comments on commit 8ea20ab

Please sign in to comment.