mirror of
https://github.com/jpros/tacticalrmm-web.git
synced 2026-01-19 19:40:50 +00:00
fix phantom column fixes amidaware/tacticalrmm#1264
This commit is contained in:
@@ -374,16 +374,10 @@ export default {
|
||||
"make_model",
|
||||
"physical_disks",
|
||||
];
|
||||
|
||||
// quasar filter only does visible columns so this is a hack to add hidden columns we want to filter
|
||||
for (const elem of hiddenFields) {
|
||||
if (!cols.find((o) => o.name === elem)) {
|
||||
cols.push({
|
||||
name: elem,
|
||||
field: elem,
|
||||
});
|
||||
}
|
||||
}
|
||||
// originally I was modifying cols directly but this led to phantom colum so doing it this way now
|
||||
// https://github.com/amidaware/tacticalrmm/issues/1264
|
||||
const allColumns = [...cols, ...hiddenFields.map((field) => ({ field }))];
|
||||
|
||||
const lowerTerms = terms ? terms.toLowerCase() : "";
|
||||
let advancedFilter = false;
|
||||
@@ -437,7 +431,7 @@ export default {
|
||||
}
|
||||
|
||||
// Normal text filter
|
||||
return cols.some((col) => {
|
||||
return allColumns.some((col) => {
|
||||
const val = cellValue(col, row) + "";
|
||||
const haystack =
|
||||
val === "undefined" || val === "null" ? "" : val.toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user