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

3.7.6版本 reset、refreshDeps 会被重置为defaultParams[0].current,不符合业务需求 #2172

Closed
xiaomoziyi opened this issue Apr 24, 2023 · 7 comments · Fixed by #2178

Comments

@xiaomoziyi
Copy link

这个版本修复修出bug了。
image

如果reset要充值页码,应该用reset defaultPageSize, 而不是defaultParams,defaultParams是作为初次传参使用的。不然的话,refreshDeps的说明是refreshDeps 变化,会重置 current 到第一页,并重新发起请求。现在这个版本,会把current重置到defaultParams的current.
希望尽快修复!!!! @sorrycc

@hchlq
Copy link
Collaborator

hchlq commented Apr 25, 2023

相关 MR: #2090

@hchlq hchlq assigned hchlq and unassigned hchlq Apr 25, 2023
@hchlq
Copy link
Collaborator

hchlq commented Apr 25, 2023

@Ali-ovo

@Ali-ovo
Copy link
Contributor

Ali-ovo commented Apr 26, 2023

那如果 defaultParamsdefaultPageSize 同时存在的话, reset 的时候 pageSize 属性需要以什么为准呢
还是说这两个有个 优先级@hchlq

@hchlq
Copy link
Collaborator

hchlq commented Apr 27, 2023

个人感觉 defaultParams 中 pageSize 的权重会比 defaultPageSize 的权重高, 如有 defaultParams 你应当这么使用
defaultParams:{
pageSize: xxx
}
而不是重复定义 defaultParams 和 defaultPageSize

我赞同这个说法,不要重复定义 pageSize,否则会产生歧义,默认优先级 defaultParams 中高一些

@hchlq
Copy link
Collaborator

hchlq commented Apr 27, 2023

@Ali-ovo 但是要兼容之前的版本,以前的版本是以 defaultPageSize 为准,你这边改的以 defaultParams 为准了,是个 break change,这个在 3.x 版本先不这么改,我先 revert 回去了,后续在 v4 再做调整哈

image

@Ali-ovo
Copy link
Contributor

Ali-ovo commented Apr 27, 2023

@Ali-ovo 但是要兼容之前的版本,以前的版本是以 defaultPageSize 为准,你这边改的以 defaultParams 为准了,是个 break change,这个在 3.x 版本先不怎么改,我先 revert 回去了,后续在 v4 再做调整哈

image

好的没问题

@crazylxr
Copy link
Collaborator

已经修复发新版了,v3.3.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants