Vuetify Version: 2.2.11
Vue Version: 2.6.11
Browsers: Chrome 80.0.3987.106
OS: Linux x86_64
search for "jika" . the description is well highlighted, but the entire name which is not containing the searched text is also highlighted.
only highlight the searched text for other text element.
i did a workaround, i think this line make it highlights every middle text wether text was found or not.
modifying methods getMaskedCharacters & genFilteredText like:
genFilteredText (text: string) {
...
const { start, middle, end, found } = this.getMaskedCharacters(text)
if (found) {
return `${escapeHTML(start)}${this.genHighlight(middle)}${escapeHTML(end)}`
} else {
return `${escapeHTML(start)}${escapeHTML(middle)}${escapeHTML(end)}`
}
},
getMaskedCharacters (text: string): {
...
if (index < 0) return { start: '', middle: text, end: '', found: false }
...
return { start, middle, end, found: true }
},
Or just return { start: text, middle: '', end: '' } unless there's some situation we need to highlight the whole lot.
Most helpful comment
Or just
return { start: text, middle: '', end: '' }unless there's some situation we need to highlight the whole lot.