Verified Commit 4840b5e7 authored by Philipp Zschumme's avatar Philipp Zschumme
Browse files

Excludes label columns from search

parent 39fede51
Pipeline #1648 passed with stages
in 12 minutes and 48 seconds
......@@ -90,16 +90,14 @@ function tableEntriesMatch(searchable, filter_strings) {
if (!table) return false;
let result = false;
let tr = table[0].getElementsByTagName("tr");
for (let j = 0; j < tr.length; j++) {
let td_list = tr[j].getElementsByTagName("td");
for (let k = 0; k < td_list.length; k++) {
let td = td_list[k];
if (td) {
let txtValue = td.textContent || td.innerText;
if (matchFilters(txtValue, filter_strings)) {
result = true;
}
let tableRow = table[0].getElementsByTagName("tr");
for (let i = 0; i < tableRow.length; i++) {
let columns = tableRow[i].getElementsByTagName("td");
let relevantColumn = columns[1]; // only include the second column which holds actual information
if (relevantColumn) {
let columnContent = relevantColumn.textContent || relevantColumn.innerText;
if (matchFilters(columnContent, filter_strings)) {
result = true;
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment