[Vuejs]-Search without special characters in vuetify data-table

0๐Ÿ‘

โœ…

Iโ€™ve found a solution:
In my object, I add a value who concatenate the original Name and the name without special chars using latinize.js module:

import latinize from 'latinize';
Person.searchLastName = Person.LastName + ' ' + latinize(Person.LastName);

In the headers object, I use my new value, but I add a template to replace this content by original value like that:

<template #[`item.Person.searchLastName`]="{ item }">
  <!-- use different value to allow search without special chars -->
  {{item.Person.LastName}}
</template>

Leave a comment