ant-design / ant-design

An enterprise-class UI design language and React UI library
https://ant.design
MIT License
90.42k stars 46.41k forks source link

select开启labelInValue后,希望把选项属性全部暴露出去或者使用扩展字段保存 #48696

Closed hans000 closed 2 weeks ago

hans000 commented 2 weeks ago

What problem does this feature solve?

目前从上下问中只能拿到value和label,复杂场景不能满足需求,所以就得自己做缓存

image

What does the proposed API look like?

把option直接导出,或者增加扩展字段

afc163 commented 2 weeks ago

What does the proposed API look like?

afc163 commented 2 weeks ago

onChange 里的第二个参数是 option。

mizi-lin commented 1 day ago

onChange 里的第二个参数是 option。

但在删除选项引起的 onChange 后,option 对象变成了 空对象

hans000 commented 1 day ago

onChange 里的第二个参数是 option。

但在删除选项引起的 onChange 后,option 对象变成了 空对象

有吗,没吧,不过我说的问题一些官方不想改,Select改不动了 QAQ