-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
🧐[问题]ProTable request和pagination.onChange会重复请求 #7423
Comments
以下的 Issues 可能会帮助到你 / The following issues may help you
|
canqi0
changed the title
🧐[问题]ProTable request和pagination.onChange会重复调用
🧐[问题]ProTable request和pagination.onChange会重复请求
Jul 26, 2023
听起还挺合理的,你要不加个去抖? |
治标不治本啊 |
理论上就应该多次发送的,有参数变化了嘛 |
我们系统也出现这个问题了, 刚开始我们没有实现onChange,表现为,有的排序页面当表格列仅有自定义筛选,没有内置筛选时,自定义筛选无效,有的页面有内置筛选,自定义筛选就有效。 我们在codeBox中没有复现,没有定义明确的再现现象,所以还没有提Issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🧐 问题描述
我想在ProTable中进行排序
onChangeSort会将sorter塞到state.queryCondition 并请求接口
onChangePage会更新state.queryCondition中的current pageSize 并请求接口
场景1:
如果我点击过排序 且当前 current = 1 时
再点击第二页会先调用onChangePage 设置 current = 2
更新后又调用了一次onChangeSort 此时 current = 2
共请求两次
场景2:
如果我点击过排序 且当前 current = 1 时
再点击第二页会先调用onChangePage 设置 current = 2
更新后又调用了一次onChangeSort 此时 我想在onChangeSort中设置current = 1 回到第一页 此时current = 1
再次触发onChangePage 此时 current = 1
再次触发onChangeSort 此时 current = 1
共请求四次
尝试解决
🚑 其他信息
版本更新前pagination.onChange 和 request 并不会互相影响
Table中的排序和筛选是使用onChange实现的,并指定了触发类型action
ProTable中pagination.onChange和request是否有些冲突,以及希望request中可以指定当前触发类型
The text was updated successfully, but these errors were encountered: