Normalization of ä, ö,ü and ß in filters and search of duplicates

This commit is contained in:
2026-08-03 21:17:32 +00:00
parent b54b180115
commit 9b080bc860
9 changed files with 95 additions and 15 deletions
+4 -2
View File
@@ -11,9 +11,11 @@
const table = document.getElementById('software-inventory-table');
if (filter && table) {
filter.addEventListener('input', () => {
const needle = filter.value.trim().toLocaleLowerCase();
const normalize = window.AssetManagerNormalizeSearchText ||
((value) => String(value || '').toLocaleLowerCase());
const needle = normalize(filter.value.trim());
table.querySelectorAll('tbody tr').forEach((row) => {
row.hidden = needle && !row.textContent.toLocaleLowerCase().includes(needle);
row.hidden = Boolean(needle) && !normalize(row.textContent).includes(needle);
});
});
}