Skip to content

fix: preserve free-form text in AutocompleteElement#403

Open
bethmaloney wants to merge 2 commits intodohomi:masterfrom
bethmaloney:fix/autocomplete-freesolo-input-transform
Open

fix: preserve free-form text in AutocompleteElement#403
bethmaloney wants to merge 2 commits intodohomi:masterfrom
bethmaloney:fix/autocomplete-freesolo-input-transform

Conversation

@bethmaloney
Copy link
Copy Markdown
Contributor

@bethmaloney bethmaloney commented Mar 26, 2026

freeSolo text (free text) was being discarded from the AutoComplete element.

  • The default input transform in AutocompleteElement always matches the form value against the options list matchOptionByValue(), returning null when no match is found even when freeSolo is enabled. This causes user-typed free text to be silently discarded.
  • When freeSolo is true, the transform now falls back to the raw value instead of null, for both single and multiple modes.

Also added the free solo single/multi to storybook for testing

bethmaloney and others added 2 commits March 26, 2026 10:37
…enabled

The default input transform in AutocompleteElement always matches the
value against the options list and returns null when no match is found,
even when freeSolo is true. This causes user-typed free text to be
discarded. Fall back to the raw value when freeSolo is enabled and no
option match exists, for both single and multiple modes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add FreeSolo and FreeSoloMultiple stories to demonstrate and manually
test free-form text input in the AutocompleteElement component.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

@bethmaloney is attempting to deploy a commit to the Lumenmedia Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant