Skip to content

Commit

Permalink
fix(input): use suggestedValue for [multiple]
Browse files Browse the repository at this point in the history
  • Loading branch information
clshortfuse committed Jul 31, 2024
1 parent 971ff01 commit 0e42ee7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export default CustomElement
if (this.readOnly) return;
const { _suggestionText, _suggestionValue, _input, multiple, _listbox, _values } = this;
if (multiple) {
const newArray = [..._values.filter(Boolean), _suggestionText];
const newArray = [..._values.filter(Boolean), _suggestionValue ?? _suggestionText];
this._values = [...new Set(newArray)];
} else {
this.value = _suggestionValue;
Expand Down

0 comments on commit 0e42ee7

Please sign in to comment.