Closed Gikus closed 5 years ago
var matcher = new RegExp($scope.filterValue);
You're creating a regular expression based on the text. Just set the i
flag for case-insensitivity. For instance:
var matcher = new RegExp($scope.filterValue, 'i');
This won't help ignore punctuation, but since you're using a regex`, then you'll just need to customize the regular expression.
You could also use $scope.filterValue
to do a manual string comparison, instead of deferring entirely to regex.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. If you believe that this is still an issue in the latest version, feel free to re-open it. Thank you for your contributions.
Hello! I have a similar code and I think it renders matched data within the table. I'm not savvy in programming and may be you could make some tweaks here. I need it to show any entered data if such exists in the address list and not only exact match with all the uppercase and lowercase, commas and so on. Now it displays only exact match. The address list and the search bar: http://wp3.it-do.pw72n.spectrum.myjino.ru/sample-page/
My code:
<input ng-model='filterValue' class="search_block" placeholder="Введите адрес для поиска" ng-change="filter()"/>
Originally posted by @Gikus in https://github.com/angular-ui/ui-grid/issues/4224#issuecomment-494731725