diff --git a/tools/winscope/src/TransactionsView.vue b/tools/winscope/src/TransactionsView.vue index e15afe03e..c5f999603 100644 --- a/tools/winscope/src/TransactionsView.vue +++ b/tools/winscope/src/TransactionsView.vue @@ -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) {