stripped off accented characters from search field for browser client
This commit is contained in:
parent
71cfcd3329
commit
2a2e9a0d7f
|
@ -193,10 +193,11 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
|
|||
clearTimeout(this.searchTimeout);
|
||||
}
|
||||
const filterDeleted = (c: CipherView) => !c.isDeleted;
|
||||
const normalizedSearchText = this.searchText?.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
||||
if (timeout == null) {
|
||||
this.hasSearched = this.searchService.isSearchable(this.searchText);
|
||||
this.hasSearched = this.searchService.isSearchable(normalizedSearchText);
|
||||
this.ciphers = await this.searchService.searchCiphers(
|
||||
this.searchText,
|
||||
normalizedSearchText,
|
||||
filterDeleted,
|
||||
this.allCiphers
|
||||
);
|
||||
|
@ -207,12 +208,12 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
this.searchPending = true;
|
||||
this.searchTimeout = setTimeout(async () => {
|
||||
this.hasSearched = this.searchService.isSearchable(this.searchText);
|
||||
this.hasSearched = this.searchService.isSearchable(normalizedSearchText);
|
||||
if (!this.hasLoadedAllCiphers && !this.hasSearched) {
|
||||
await this.loadCiphers();
|
||||
} else {
|
||||
this.ciphers = await this.searchService.searchCiphers(
|
||||
this.searchText,
|
||||
normalizedSearchText,
|
||||
filterDeleted,
|
||||
this.allCiphers
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue