pro-components
pro-components copied to clipboard
🐛[BUG] ProTable columns中配置valueType:'select' +request时,搜索完选中值后会触发一次新的搜索
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🐛 bug 描述
在ProTable columns中配置了一个远程下拉搜索框
{
title: '测试',
dataIndex: 'test',
hideInTable: true,
valueType: 'select',
request: async params => {
console.log(params)
const result = await fetchData({ name: params.keyWords || '' })
return result?.map(({ id: value, name: label }) => {
return { label, value }
})
},
defaultKeyWords: '',
fieldProps: {
showSearch: true,
placeholder: '请输入',
},
},
📷 复现步骤
- 输入框搜索内容
- 选中一个值
🏞 期望结果
选中值后不触发请求
💻 复现代码
https://codesandbox.io/p/sandbox/qgnx8z
© 版本信息
- ProComponents 版本:2.6.42
- umi 版本 未使用
- 浏览器环境 Chrome 129
- 开发环境 macOS