Merge pull request #9896 from mfo/US/fix-combobox-with-not-trimmed-option

fix(combobox): some old procedure still have options with trailing white spaces. ensure to trim selected value as well as options.value for better comparison
This commit is contained in:
mfo 2024-01-11 08:40:11 +00:00 committed by GitHub
commit e2cb833a51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,7 +105,7 @@ export class Combobox {
}
const option = this.#visibleOptions.find(
(option) => option.value == maybeValue
(option) => option.value.trim() == maybeValue.trim()
);
if (!option) return false;