Coerce picker option labels to strings to fix bug when using autocomplete on numeric label types
This commit is contained in:
parent
39e1e84512
commit
c21f4b9681
|
@ -63,9 +63,9 @@
|
||||||
const getFilteredOptions = (options, term, getLabel) => {
|
const getFilteredOptions = (options, term, getLabel) => {
|
||||||
if (autocomplete && term) {
|
if (autocomplete && term) {
|
||||||
const lowerCaseTerm = term.toLowerCase()
|
const lowerCaseTerm = term.toLowerCase()
|
||||||
return options.filter(option =>
|
return options.filter(option => {
|
||||||
getLabel(option)?.toLowerCase().includes(lowerCaseTerm)
|
return `${getLabel(option)}`?.toLowerCase().includes(lowerCaseTerm)
|
||||||
)
|
})
|
||||||
}
|
}
|
||||||
return options
|
return options
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue