Skip to content

Commit

Permalink
fix(QSelect): make sure the autocomplete value is checked against a s…
Browse files Browse the repository at this point in the history
…tring; optimize check for afterFilter in fillFn quasarframework#16698
  • Loading branch information
pdanpdan committed Dec 31, 2023
1 parent d398ec4 commit 2c32e9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/components/select/QSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ export default Vue.extend({
if (typeof value === 'string' && value.length > 0) {
const needle = value.toLocaleLowerCase()
const findFn = extractFn => {
const option = this.options.find(opt => extractFn(opt).toLocaleLowerCase() === needle)
const option = this.options.find(opt => String(extractFn(opt)).toLocaleLowerCase() === needle)

if (option === void 0) {
return false
Expand All @@ -727,7 +727,7 @@ export default Vue.extend({
if (findFn(this.getOptionValue) === true) {
return
}
if (findFn(this.getOptionLabel) === true || afterFilter === true) {
if (afterFilter === true || findFn(this.getOptionLabel) === true) {
return
}

Expand Down

0 comments on commit 2c32e9d

Please sign in to comment.