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

🐛[BUG]proformselect的params为函数时不起作用 #8693

Open
avivadepp opened this issue Sep 2, 2024 · 1 comment
Open

🐛[BUG]proformselect的params为函数时不起作用 #8693

avivadepp opened this issue Sep 2, 2024 · 1 comment

Comments

@avivadepp
Copy link

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🐛 bug 描述

proformselect的params定义为函数或对象,但是当params为函数时,不起作用

params?: ((record: Entity, column: ProSchema<Entity, ExtraProps>) => Record<string, any>) | Record<string, any>;

📷 复现步骤

{
dataIndex: 'select',
label: 'select',
valueType: 'select',
params: { timestamp: Math.random() },
 request: async (params) => {
                        console.log('params', params);
                 }
}

时,params为{timestamp:xxxx},且能触发request的重新请求。

{
dataIndex: 'select',
label: 'select',
valueType: 'select',
params: () => ({ timestamp: Math.random() }),
 request: async (params) => {
                        console.log('params', params);
                 }
}

时params为空,且request未重新请求。

🏞 期望结果

当params为函数时,params不为空且能触发request的重新请求。

💻 复现代码

© 版本信息

  • ProComponents 版本: 2.6.49
  • umi 版本
  • 浏览器环境
  • 开发环境 [e.g. mac OS]

🚑 其他信息

Copy link

github-actions bot commented Sep 2, 2024

以下的 Issues 可能会帮助到你 / The following issues may help you

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

No branches or pull requests

1 participant