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] 在LightFilter中使用ProFormSelect的两个bug反馈 #7225

Closed
oldevil opened this issue Jun 13, 2023 · 4 comments
Closed

🐛[BUG] 在LightFilter中使用ProFormSelect的两个bug反馈 #7225

oldevil opened this issue Jun 13, 2023 · 4 comments

Comments

@oldevil
Copy link

oldevil commented Jun 13, 2023

提问前先看看:

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

🐛 bug 描述
场景:在LightFilter中使用ProFormSelect
问题1:当ProFormSelect的label是dom时,选中label后,回显的内容为[object,object]
问题2:为了解决问题1,我选择用optionLabelProp自定义回显内容,但是不生效

📷 复现代码
问题1:

<LightFilter>
        <ProFormSelect
          name="sex"
          label="性别"
          mode="multiple"
          options={[
            { label: <div>男</div>, value: 'aaa' },
            { label: <div>女</div>, value: 'bbb' },
          ]}
        />
</LightFilter>

问题2:

<LightFilter>
        <ProFormSelect
          name="sex"
          label="性别"
          mode="multiple"
          options={[
            { label: '男', value: 'aaa' },
            { label: '女', value: 'bbb' },
          ]}
          fieldProps={{
            optionLabelProp: 'value',
          }}
        />
</LightFilter>

🏞 期望结果
问题1:能正常回显下拉中可视的label内容
问题2:能按照optionLabelProp指定的key进行回显

© 版本信息
ProComponents 版本: ^2.5.3
umi 版本: umi4 umi max
antd版本:^5.5.2
浏览器环境:chrome 版本 114.0.5735.106(正式版本) (arm64)
开发环境:mac OS

🚑 其他信息
注:去掉LightFilter包裹后,以上问题均不存在

@SYJ0414
Copy link
Contributor

SYJ0414 commented Jun 13, 2023

在LightFilter包裹的ProFormSelect时,fieldProps里多个属性都没有效果,如optionLabelProp、dropdownRender、onDropdownVisibleChange等没效果,去掉外层LightFilter就没有问题

SYJ0414 added a commit to SYJ0414/pro-components that referenced this issue Jun 14, 2023
…-design#7225)

在LightFilter中使用ProFormSelect时,optionLabelProp不生效问题修复
SYJ0414 added a commit to SYJ0414/pro-components that referenced this issue Jun 14, 2023
…design#7225)

在LightFilter中使用ProFormSelect时,当label是dom元素时,回显乱码成[object,object]问题修复
SYJ0414 added a commit to SYJ0414/pro-components that referenced this issue Jun 14, 2023
…design#7225)

在LightFilter中使用ProFormSelect时,当label是dom元素时,回显乱码成[object,object]问题修复
@dlspacezero
Copy link

在LightFilter包裹的ProFormSelect时,fieldProps里多个属性都没有效果,如optionLabelProp、dropdownRender、onDropdownVisibleChange等没效果,去掉外层LightFilter就没有问题

optionItemRender 也不生效

@buruguichen
Copy link

666啊

chenshuai2144 added a commit that referenced this issue Jun 19, 2023
* feat(field): 在LightFilter中使用ProFormSelect时optionLabelProp不生效问题修复 (#7225)

在LightFilter中使用ProFormSelect时,optionLabelProp不生效问题修复

* feat(utils): 在LightFilter中使用ProFormSelect,label是dom元素时,回显乱码问题修复 (#7225)

在LightFilter中使用ProFormSelect时,当label是dom元素时,回显乱码成[object,object]问题修复

* docs: add changelog

* fix(table): if Editable throw error, no canel build

* merge master

---------

Co-authored-by: 期贤 <qixian.cs@antgroup.com>
@OlyaKastsiukova
Copy link

still reproduced

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

6 participants