I recently upgraded to IgniteUI 18.2.83.
When I use the Filtering feature, I sometimes set a default filtering expression as follows:
{ name: "Filtering", allowFiltering: true, caseSensitive: false, type: "remote", mode: "simple", filterDialogContainment: "window", filterExprUrlKey: "filter", columnSettings: [ { columnKey: "Options", allowFiltering: false }, { columnKey: "TaskNumber", allowFiltering: true, conditionList: ["contains", "doesNotContain"] }, { columnKey: "Status", allowFiltering: true, customConditions: { contains: { labelText: "Contains", expressionText: "contains", requireExpr: true }, doesNotContain: { labelText: "DoesNotContain", expressionText: "doesNotContain", requireExpr: true }, incomplete: { labelText: "Incomplete", expressionText: "Incomplete", requireExpr: false }, workNeeded: { labelText: "Work Needed", expressionText: "Work Needed", requireExpr: false }, critical: { labelText: "Critical", expressionText: "Critical", requireExpr: false }, new: { labelText: "New", expressionText: "New", requireExpr: false }, escalated: { labelText: "Escalated", expressionText: "Escalated", requireExpr: false }, inProgress: { labelText: "In Progress", expressionText: "In Progress", requireExpr: false } }, conditionList: ["contains", "doesNotContain", "incomplete", "workNeeded", "critical", "new", "escalated", "inProgress"], defaultExpressions: [{ cond: "incomplete" }] } ] }
This default filter on the "Status" column works fine and it correctly filters the grid to only show incomplete tasks by passing in the following filter "filter(Status:string)=incomplete(undefined)".
But as soon as I start typing in a filter on the "TaskNumber" column it changes my "Status" filter from my custom "incomplete" filtering option and instead it uses "contains(incomplete)" and filters it using the "contains" logic by passing in this filter "filter(Status:string)=contains(incomplete)".
Once I go and manually select the "incomplete" filtering option again, it goes back to the normal behavior and users this filter "filter(Status:string)=incomplete(undefined)".
Somehow it is cancelling my default filtering expressions once the user starts typing in their own filtering data manually.
How can I prevent this from happening?
I am using jquery 3.4.1 because my system admins have recently required me to move to the newest version of the jquery library.
The difference is in filterExprUrlKey option. It specifies how to encode the filtering expressions.
I have modified your fiddle here. However the way it sends filteirng data as query strings is very different from the way my app sends filtering data.
For example, yours does this:
https://getdatasource.com?$filter=and IsActive eq true
whereas mine sends this:
https://getdatasource.com?filter(Active:bool)=true()
I am not sure why yours is so different from mine. I am using IgniteUI version 18.2.83.
Also the AppendRowsOnDemand feature does not appear to be working in the fiddle. I was only trying to implement this feature in the fiddle because I am using it in my application. But maybe it's unrelated and unnecessary.
Hello Jack,
I tried reproducing this in the following fiddle, but couldn't see the issue. Can you modify it and demonstrate the scenario into the fiddle?
Or is this reproducing with remote filtering only?