Add support for named surfaces filters
Test: N/A Change-Id: I0cc7385df06ad889845b78310360a66265a7af11
This commit is contained in:
@@ -110,8 +110,24 @@ export default {
|
||||
|
||||
if (this.filters.length > 0) {
|
||||
filteredData = filteredData.filter(
|
||||
this.filterTransactions(transaction =>
|
||||
this.filters.includes("" + transaction.obj.id)));
|
||||
this.filterTransactions(transaction => {
|
||||
for (const filter of this.filters) {
|
||||
if (isNaN(filter) && transaction.obj?.name?.includes(filter)) {
|
||||
// If filter isn't a number then check if the transaction's
|
||||
// target surface's name matches the filter — if so keep it.
|
||||
return true;
|
||||
}
|
||||
if (filter == transaction.obj.id) {
|
||||
// If filteter is a number then check if the filter matches
|
||||
// the transaction's target surface id — if so keep it.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Exclude transaction if it fails to match filter.
|
||||
return false;
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (this.selectedProperty) {
|
||||
|
||||
Reference in New Issue
Block a user