@@ -29,7 +29,7 @@ module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil
2929 */
3030 rowSearcher . getTerm = function getTerm ( filter ) {
3131 if ( typeof ( filter . term ) === 'undefined' ) { return filter . term ; }
32-
32+
3333 var term = filter . term ;
3434
3535 // Strip leading and trailing whitespace if the term is a string
@@ -58,7 +58,7 @@ module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil
5858 return term ;
5959 }
6060 } ;
61-
61+
6262
6363 /**
6464 * @ngdoc function
@@ -77,7 +77,7 @@ module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil
7777 }
7878
7979 var term = rowSearcher . getTerm ( filter ) ;
80-
80+
8181 if ( / \* / . test ( term ) ) {
8282 var regexpFlags = '' ;
8383 if ( ! filter . flags || ! filter . flags . caseSensitive ) {
@@ -92,37 +92,37 @@ module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil
9292 return defaultCondition ;
9393 }
9494 } ;
95-
96-
95+
96+
9797 /**
9898 * @ngdoc function
9999 * @name setupFilters
100100 * @methodOf ui.grid.service:rowSearcher
101101 * @description For a given columns filters (either col.filters, or [col.filter] can be passed in),
102102 * do all the parsing and pre-processing and store that data into a new filters object. The object
103103 * has the condition, the flags, the stripped term, and a parsed reg exp if there was one.
104- *
105- * We could use a forEach in here, since it's much less performance sensitive, but since we're using
104+ *
105+ * We could use a forEach in here, since it's much less performance sensitive, but since we're using
106106 * for loops everywhere else in this module...
107- *
107+ *
108108 * @param {array } filters the filters from the column (col.filters or [col.filter])
109109 * @returns {array } An array of parsed/preprocessed filters
110110 */
111111 rowSearcher . setupFilters = function setupFilters ( filters ) {
112112 var newFilters = [ ] ;
113-
113+
114114 var filtersLength = filters . length ;
115115 for ( var i = 0 ; i < filtersLength ; i ++ ) {
116116 var filter = filters [ i ] ;
117-
117+
118118 if ( filter . noTerm || ! gridUtil . isNullOrUndefined ( filter . term ) ) {
119119 var newFilter = { } ;
120-
120+
121121 var regexpFlags = '' ;
122122 if ( ! filter . flags || ! filter . flags . caseSensitive ) {
123123 regexpFlags += 'i' ;
124124 }
125-
125+
126126 if ( ! gridUtil . isNullOrUndefined ( filter . term ) ) {
127127 // it is possible to have noTerm.
128128 if ( filter . rawTerm ) {
@@ -132,7 +132,7 @@ module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil
132132 }
133133 }
134134 newFilter . noTerm = filter . noTerm ;
135-
135+
136136 if ( filter . condition ) {
137137 newFilter . condition = filter . condition ;
138138 } else {
@@ -144,7 +144,7 @@ module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil
144144 if ( newFilter . condition === uiGridConstants . filter . STARTS_WITH ) {
145145 newFilter . startswithRE = new RegExp ( '^' + newFilter . term , regexpFlags ) ;
146146 }
147-
147+
148148 if ( newFilter . condition === uiGridConstants . filter . ENDS_WITH ) {
149149 newFilter . endswithRE = new RegExp ( newFilter . term + '$' , regexpFlags ) ;
150150 }
@@ -156,24 +156,24 @@ module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil
156156 if ( newFilter . condition === uiGridConstants . filter . EXACT ) {
157157 newFilter . exactRE = new RegExp ( '^' + newFilter . term + '$' , regexpFlags ) ;
158158 }
159-
159+
160160 newFilters . push ( newFilter ) ;
161161 }
162162 }
163163 return newFilters ;
164164 } ;
165-
165+
166166
167167 /**
168168 * @ngdoc function
169169 * @name runColumnFilter
170170 * @methodOf ui.grid.service:rowSearcher
171171 * @description Runs a single pre-parsed filter against a cell, returning true
172172 * if the cell matches that one filter.
173- *
173+ *
174174 * @param {Grid } grid the grid we're working against
175175 * @param {GridRow } row the row we're matching against
176- * @param {GridCol } column the column that we're working against
176+ * @param {GridColumn } column the column that we're working against
177177 * @param {object } filter the specific, preparsed, filter that we want to test
178178 * @returns {boolean } true if we match (row stays visible)
179179 */
@@ -266,19 +266,19 @@ module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil
266266 * @propertyOf ui.grid.class:GridOptions
267267 * @description False by default. When enabled, this setting suppresses the internal filtering.
268268 * All UI logic will still operate, allowing filter conditions to be set and modified.
269- *
269+ *
270270 * The external filter logic can listen for the `filterChange` event, which fires whenever
271271 * a filter has been adjusted.
272272 */
273273 /**
274274 * @ngdoc function
275275 * @name searchColumn
276276 * @methodOf ui.grid.service:rowSearcher
277- * @description Process provided filters on provided column against a given row. If the row meets
277+ * @description Process provided filters on provided column against a given row. If the row meets
278278 * the conditions on all the filters, return true.
279279 * @param {Grid } grid Grid to search in
280280 * @param {GridRow } row Row to search on
281- * @param {GridCol } column Column with the filters to use
281+ * @param {GridColumn } column Column with the filters to use
282282 * @param {array } filters array of pre-parsed/preprocessed filters to apply
283283 * @returns {boolean } Whether the column matches or not.
284284 */
@@ -291,7 +291,7 @@ module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil
291291 for ( var i = 0 ; i < filtersLength ; i ++ ) {
292292 var filter = filters [ i ] ;
293293
294- if ( ! gridUtil . isNullOrUndefined ( filter . term ) && filter . term !== '' || filter . noTerm ) {
294+ if ( ! gridUtil . isNullOrUndefined ( filter . term ) && filter . term !== '' || filter . noTerm ) {
295295 var ret = rowSearcher . runColumnFilter ( grid , row , column , filter ) ;
296296 if ( ! ret ) {
297297 return false ;
@@ -307,7 +307,7 @@ module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil
307307 * @ngdoc function
308308 * @name search
309309 * @methodOf ui.grid.service:rowSearcher
310- * @description Run a search across the given rows and columns, marking any rows that don't
310+ * @description Run a search across the given rows and columns, marking any rows that don't
311311 * match the stored col.filters or col.filter as invisible.
312312 * @param {Grid } grid Grid instance to search inside
313313 * @param {Array[GridRow] } rows GridRows to filter
@@ -366,14 +366,14 @@ module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil
366366 var foreachFilterCol = function ( grid , filterData ) {
367367 var rowsLength = rows . length ;
368368 for ( var i = 0 ; i < rowsLength ; i ++ ) {
369- foreachRow ( grid , rows [ i ] , filterData . col , filterData . filters ) ;
369+ foreachRow ( grid , rows [ i ] , filterData . col , filterData . filters ) ;
370370 }
371371 } ;
372372
373373 // nested loop itself - foreachFilterCol, which in turn calls foreachRow
374374 var filterDataLength = filterData . length ;
375375 for ( var j = 0 ; j < filterDataLength ; j ++ ) {
376- foreachFilterCol ( grid , filterData [ j ] ) ;
376+ foreachFilterCol ( grid , filterData [ j ] ) ;
377377 }
378378
379379 if ( grid . api . core . raise . rowsVisibleChanged ) {
0 commit comments