fix(combobox): correct fit selection count chip#14243
fix(combobox): correct fit selection count chip#14243Amretasre002762670 wants to merge 4 commits intodevfrom
Conversation
jcfranco
left a comment
There was a problem hiding this comment.
Looking good, @Amretasre002762670! 😎
Do existing tests provide coverage for these changes or do they need to be updated?
| private renderChipCount(count: number, scale: Scale): JsxNode { | ||
| const label = | ||
| this.messages.disabledSelectedCount?.replace("{count}", `${count}`) ?? `+${count}`; | ||
| private renderChipCount(count: number, scale: Scale, includePlus: boolean = true): JsxNode { |
There was a problem hiding this comment.
Nit: includePlus is optional, but still passes a default value in one of its call sites. I'd suggest making this a required argument or not passing the default when calling it.
|
@eriklharper Can you review these changes too? |
The current test suite covers these changes, so no additional updates are needed. |
Thanks Erik! I added this as an acceptance criteria for the related issue #12287 as it seems like it should be done in conjunction. |
eriklharper
left a comment
There was a problem hiding this comment.
I think if we fix the current behavior where the disabled + selected options get added to the combobox's value, a lot of the built-in chip display logic should "just work", so let's address that as part of this PR since it is directly related. @Amretasre002762670 we can pair on this if you're interested, just let me know!


Related Issue: #12287
Summary
Refined combobox fit-mode count chips and deferred selection refresh to keep counts accurate.