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

Table排序后页数没有回到第一页 #16978

Closed
Veigar-C opened this issue Jun 5, 2019 · 4 comments

Comments

Projects
None yet
5 participants
@Veigar-C
Copy link

commented Jun 5, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

点击下一页,然后排序

What is expected?

排序后onChange的pagination.current为 1

What is actually happening?

仍为当前页码

Environment Info
antd 3.19.2
React 16.4.1
System win10
Browser chrome
@zombieJ

This comment has been minimized.

Copy link
Member

commented Jun 7, 2019

默认行为。
如果需要跳到第一页,在 onChange 里判断一下是否是排序设置一下。

@zombieJ zombieJ closed this Jun 7, 2019

@Veigar-C

This comment has been minimized.

Copy link
Author

commented Jun 7, 2019

现在目前就是这样解决的,但是京东、淘宝这些哪些是筛选排序后仍在当前页面。
你认为排序后仍然是当前页这样合理吗? @zombieJ

@afc163

This comment has been minimized.

Copy link
Member

commented Jun 7, 2019

pagination.current = 1;

我们在 filter 的时候是回到第一页的,我感觉可以统一一下行为。

@stevenjlho

This comment has been minimized.

Copy link

commented Jun 25, 2019

但是这样修改只适合需要服务器端请求数据排序的情况吧,如果只需要在当前页面排序,这样就会造成onChange的时候不知道这个是否是换页操作还是排序操作了吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.