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

🧐[问题]重置查询search.transform未对查询参数key进行转换。 #1092

Closed
985563349 opened this issue Nov 26, 2020 · 4 comments · Fixed by #1176
Closed

🧐[问题]重置查询search.transform未对查询参数key进行转换。 #1092

985563349 opened this issue Nov 26, 2020 · 4 comments · Fixed by #1176

Comments

@985563349
Copy link

985563349 commented Nov 26, 2020

🧐 问题描述

使用search.transform进行查询操作能实现对查询参数key的转换,而使用重置按钮查询时却未能对key进行转换。

💻 示例代码

https://codesandbox.io/s/trusting-river-ipzco?file=/App.tsx

🚑 其他信息

@985563349 985563349 changed the title 🧐[问题]重置查询search.transform未对查询参数key进行转换时。 🧐[问题]重置查询search.transform未对查询参数key进行转换。 Nov 26, 2020
@chenshuai2144
Copy link
Contributor

reset 需要转化?

@985563349
Copy link
Author

reset会自动调用request,如果search.transform是实现对查询参数key的转换,可能还是期望能够进行转换的。如果不支持,那此类场景是否提供了解决方案?

@chenshuai2144
Copy link
Contributor

chenshuai2144 commented Nov 27, 2020

你的场景是 reset 的时候有默认值是吗?
那的确应该处理一下

@985563349
Copy link
Author

感谢您的回复!查询参数具有默认值应该是很常见的场景,目前我的处理方案是在request的绑定函数中手动去判断处理。

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

Successfully merging a pull request may close this issue.

2 participants