ant-design Suffix icon behavior for undefined is inconsistent between components

hs1ihplo  于 4个月前  发布在  其他
关注(0)|答案(4)|浏览(51)

Steps to reproduce

Check the suffix icon of Select and DatePicker in the provided example

What is expected?

specifying undefined in suffixIcon in all components should yield the same UI behavior - either displaying nothing or the default icon, but not both

What is actually happening?

specifying undefined in Select renders the default caret, and the same value in DatePicker is rendering nothing
| Environment | Info |
| ------------ | ------------ |
| antd | 5.17.0 |
| React | ^18 |
| System | Windows 11 |
| Browser | Chrome 123 |

k5ifujac

k5ifujac2#

What is expected? displaying nothing or the default icon?

ct2axkht

ct2axkht3#

I think consistency is more important. Intuitively thinking, displaying the default icon makes sense…

________________________________ From: afc163 ***@***.***> Sent: Thursday, May 9, 2024 10:28:09 PM To: ant-design/ant-design ***@***.***> Cc: wctiger ***@***.***>; Author ***@***.***> Subject: Re: [ant-design/ant-design] Suffix icon behavior for undefined is inconsistent between components (Issue #48847) What is expected? displaying nothing or the default icon? — Reply to this email directly, view it on GitHub<#48847 (comment)>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABV366QDA3XKQP2FMUZFVBTZBQWDTAVCNFSM6AAAAABHOYL4B6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBTG42DOMJUGU >. You are receiving this because you authored the thread.Message ID: ***@***.***>

fjaof16o

fjaof16o4#

能看看 rc-select 中的问题吗? react-component/select#1052

相关问题