You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/09/29 19:40:29 UTC
[GitHub] [trafficcontrol] rimashah25 commented on a diff in pull request #7074: Fixed server table's quick search and filter for multiple profiles
rimashah25 commented on code in PR #7074:
URL: https://github.com/apache/trafficcontrol/pull/7074#discussion_r983954178
##########
traffic_portal/app/src/common/modules/table/agGrid/CommonGridController.js:
##########
@@ -301,6 +301,34 @@ let CommonGridController = function ($scope, $document, $state, userModel, dateU
this.columns[i].tooltipValueGetter = dateCellFormatterUTC;
this.columns[i].valueFormatter = dateCellFormatterUTC;
}
+ } else if (this.columns[i].filter === 'arrayTextColumnFilter') {
+ this.columns[i].filter = 'agTextColumnFilter'
+ this.columns[i].filterParams = {
+ textCustomComparator: (filter, value, filterText) => {
+ const filterTextLowerCase = filterText.toLowerCase();
+ const valueLowerCase = value.toString().toLowerCase();
+ const profileNameValue = valueLowerCase.split(",");
+ switch (filter) {
+ case 'contains':
+ return valueLowerCase.indexOf(filterTextLowerCase) >= 0;
+ case 'notContains':
+ return valueLowerCase.indexOf(filterTextLowerCase) === -1;
Review Comment:
So, you want me to use `includes` for for `contains`, `notContains`, `startsWith`, `endsWith`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org