Commit b18f98fe authored by David Redondo's avatar David Redondo 🏎
Browse files

Add comma separated filtering to ApplicationsTableView

Instead of using ProcessSortFilterModel we can implement in
the callback of the KSortFilterProxyModel.


(cherry picked from commit 364bada0)
parent 50f63781
......@@ -96,6 +96,14 @@ Table.BaseTableView {
}
return true
}
filterRowCallback: function(row, parent) {
if (filterString.length == 0) {
return true
}
const name = sourceModel.data(sourceModel.index(row, filterKeyColumn, parent), filterRole).toLowerCase()
const parts = filterString.toLowerCase().split(",").map(s => s.trim()).filter(s => s.length > 0)
return parts.some(part => name.includes(part))
}
sortRole: "Value"
}
......
Markdown is supported
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