Repository navigation
v0.2.44
v0.2.44 — Small feature release
This release adds a runtime formatter for how combobox items are converted to the input string, exposed via the controller API and the inbound combobox:set event.
@data-slot/combobox
- ✨ New runtime item-to-string formatter
- Added a new exported type
ComboboxItemToStringValueand a newitemToStringValueoption onComboboxOptionsto provide a custom resolver for the selected value shown in the input.
- Added a new exported type
- ✨ Controller API: setItemToStringValue
ComboboxControllernow exposessetItemToStringValue(itemToStringValue: ComboboxItemToStringValue | null)to set or clear the runtime formatter after initialization.
- ✨ combobox:set event extended
- The inbound
combobox:setevent payload now acceptsitemToStringValue?: ComboboxItemToStringValue | null, letting consumers update the formatter via events as well. - Example payload:
{ value?: string | null, open?: boolean, inputValue?: string, itemToStringValue?: ComboboxItemToStringValue | null }
- The inbound
- Developer ergonomics
- These additions make it possible to change how items are rendered as text at runtime (for example, to reflect localization, complex DOM-derived labels, or dynamic formatting) without reinitializing the combobox.
- 🟢 Compatibility
- This is a backwards-compatible enhancement (no breaking changes). Existing behavior remains unchanged if no formatter is provided.
Chore: version bumped to 0.2.44.