fix(InputMenu/Select/SelectMenu): respect trailing: false over default trailingIcon#6457
Conversation
📝 WalkthroughWalkthroughThis PR fixes a logic bug in Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
trailing: false when trailingIcon is set
trailing: false when trailingIcon is settrailing: false over default trailingIcon
Linked issue
Resolves #6287
## What changed
This makes
trailing="false"fully opt out of the trailing section, even when a component provides a default trailing icon internally.Select,SelectMenu, andInputMenuall provide a default chevron throughtrailingIcon, so the shared icon helper now lets an explicittrailing: falsewin over that default.Why
Before this,
USelectstill rendered the chevron becauseuseComponentIconstreated anytrailingIconas enough reason to show trailing content. That made the publictrailingprop feel a bit surprising: passingfalsedid not actually hide the trailing icon.This keeps the normal default chevron behavior, while allowing users to intentionally remove it.