Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Grid Filtering Case Sensitivity
posted

There seems to be some strange behavior in the default grid filtering when cells contain the same value but differ in case. In short, it seems like the filtering 'in' condition does not respect the provided 'ignoreCase' flag and will remove unintended rows from the grid when deselecting rows in the filter box.

Example (assume 1 column in grid):

Row1: 'value1'

Row2: 'value2'

Row3: 'VALUE2'

When 'value1' is deselected from the filter box, the filtering expression treats both 'value2' and 'VALUE2' as the same with an 'ignoreCase' flag set to true - setting up a filtering expression similar to:

{ condition: { $in : ['value2']}, ignoreCase: true}
However, when the filtering expression executes the 'in' condition against the data, the 'ignoreCase' flag is not applied, and one of the rows will incorrectly be removed from the grid. In the above example, only Row2 would remain after Row1's value was deselected from the filter box.

NOTE: This behavior was noticed against a fairly large dataset. I have noticed that when dealing with fewer rows, instead of an 'in' condition, an 'equals' condition is used which DOES correctly apply the 'ignoreCase' flag and results in both Row2 and Row3 remaining after the filter is applied.

Apologies for lack of source code or images, but code is on a different system.