Skip to content

v0.2.44

Choose a tag to compare

@github-actions github-actions released this 08 Feb 10:37
· 486 commits to main since this release
a120fd8

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 ComboboxItemToStringValue and a new itemToStringValue option on ComboboxOptions to provide a custom resolver for the selected value shown in the input.
  • ✨ Controller API: setItemToStringValue
    • ComboboxController now exposes setItemToStringValue(itemToStringValue: ComboboxItemToStringValue | null) to set or clear the runtime formatter after initialization.
  • ✨ combobox:set event extended
    • The inbound combobox:set event payload now accepts itemToStringValue?: ComboboxItemToStringValue | null, letting consumers update the formatter via events as well.
    • Example payload: { value?: string | null, open?: boolean, inputValue?: string, itemToStringValue?: ComboboxItemToStringValue | null }
  • 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.