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
igGrid Filtering - Default Values Get Reset

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.

Parents Reply Children