Skip to content

Commit

Permalink
fix(QSelect): .value(opt).toLocaleLowerCase is not a function quasarf…
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoenescu committed Nov 6, 2024
1 parent eb36aa5 commit be7cc3e
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions ui/src/components/select/QSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,9 @@ export default createComponent({
if (typeof value === 'string' && value.length !== 0) {
const needle = value.toLocaleLowerCase()
const findFn = extractFn => {
const option = props.options.find(opt => extractFn.value(opt).toLocaleLowerCase() === needle)
const option = props.options.find(opt => String(extractFn.value(opt)).toLocaleLowerCase() === needle)

if (option === void 0) {
return false
}
if (option === void 0) return false

if (innerValue.value.indexOf(option) === -1) {
toggleOption(option)
Expand All @@ -681,14 +679,13 @@ export default createComponent({
return true
}
const fillFn = afterFilter => {
if (findFn(getOptionValue) === true) {
return
if (
findFn(getOptionValue) !== true
&& afterFilter !== true
&& findFn(getOptionLabel) !== true
) {
filter(value, true, () => fillFn(true))
}
if (findFn(getOptionLabel) === true || afterFilter === true) {
return
}

filter(value, true, () => fillFn(true))
}

fillFn()
Expand Down

0 comments on commit be7cc3e

Please sign in to comment.