1
0
Fork 0
mirror of synced 2024-07-09 08:16:34 +12:00

Coerce picker option labels to strings to fix bug when using autocomplete on numeric label types

This commit is contained in:
Andrew Kingston 2021-12-06 18:22:19 +00:00
parent a5b4087f64
commit 135fc61159

View file

@ -63,9 +63,9 @@
const getFilteredOptions = (options, term, getLabel) => {
if (autocomplete && term) {
const lowerCaseTerm = term.toLowerCase()
return options.filter(option =>
getLabel(option)?.toLowerCase().includes(lowerCaseTerm)
)
return options.filter(option => {
return `${getLabel(option)}`?.toLowerCase().includes(lowerCaseTerm)
})
}
return options
}