Skip to content

Commit 1bef712

Browse files
committed
fix(VAutocomplete): correct match splitting with custom filter
fixes #21228
1 parent 7321535 commit 1bef712

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: packages/vuetify/src/composables/filter.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const defaultFilter: FilterFunction = (value, query, item) => {
5757

5858
function normaliseMatch (match: FilterMatch, query: string): FilterMatchArrayMultiple | undefined {
5959
if (match == null || typeof match === 'boolean' || match === -1) return
60-
if (typeof match === 'number') return [[match, query.length]]
60+
if (typeof match === 'number') return [[match, match + query.length]]
6161
if (Array.isArray(match[0])) return match as FilterMatchArrayMultiple
6262
return [match] as FilterMatchArrayMultiple
6363
}

0 commit comments

Comments
 (0)