List of Query Builder Filters

Here you can check the list of predefined filter objects. You can complete it with your own filter with the help of the filters property.

[
    { 
        id: "less", 
        name: "less", 
        fn: (a, b) => a < b, 
        type: { "any" : "text", "number" : "text", "date" : "datepicker" } 
    },
    { 
        id: "less_or_equal", 
        name: "less or equal", 
        fn: (a, b) => a <= b,
        type: { "any" : "text", "number" : "text", "date" : "datepicker" } 
    },
    { 
        id: "greater", 
        name: "greater", 
        fn: (a, b) => a > b
        type: { "any" : "text", "number" : "text", "date" : "datepicker" }  
    },
    { 
        id: "greater_or_equal", 
        name: "greater or equal", 
        fn: (a, b) => a >= b,
        type: { "any" : "text", "number" : "text", "date" : "datepicker" } 
    },
    { 
        id: "between", 
        name: "between", 
        fn: (a, b, c) => (!b || a > b) && (!c || a < c)
        type: { "number" : "rangeslider", "date" : "daterangepicker" } 
    },
    { 
        id: "not_between", 
        name: "not between", 
        fn: (a, b, c) => (!b || a <= b) || (!c || a >= c)
        type: { "number" : "rangeslider", "date" : "daterangepicker" } 
    },
    { 
        id: "begins_with", 
        name: "begins with", 
        fn: (a, b) => a.lastIndexOf(b, 0) === 0, type: str},
        type: { "string" : "text" } 
    },
    { 
        id: "not_begins_with", 
        name: "not begins with", 
        fn: (a, b) => a.lastIndexOf(b, 0) !== 0, 
        type: { "string" : "text" } 
    },
    { 
        id: "contains", 
        name: "contains", 
        fn: (a, b) => a.indexOf(b) !== -1, type: str}, 
        type: { "string" : "text" }
    },
    { 
        id: "not_contains", 
        name: "not contains", 
        fn: (a, b) => a.indexOf(b) === -1,
        type: { "string" : "text" } 
    },
    { 
        id: "ends_with", 
        name: "ends with", 
        fn: (a, b) => a.indexOf(b, a.length - b.length) !== -1,
        type: { "string" : "text" } 
    },
    { 
        id: "not_ends_with", 
        name: "not ends with", 
        fn: (a, b) => a.indexOf(b, a.length - b.length) === -1,
        type: { "string" : "text" }
    },
    { 
        id: "is_empty", 
        name: "is empty", 
        fn: (a) => a.length === 0,
        type: { "string": "none" } 
    },
    { 
        id: "is_not_empty", 
        name: "is not empty", 
        fn: (a) => a.length > 0, 
        type: { "string": "none" } 
    },
    { 
        id: "equal", 
        name: "equal", 
        fn: (a, b) => prepare(a) == prepare(b), 
        type: { "any" : "text", "date" : "datepicker" }
    },
    { 
        id: "not_equal", 
        name: "not equal", 
        fn: (a, b) =>  prepare(a) != prepare(b), 
        type: { "any" : "text", "date" : "datepicker" } 
    },
    { 
        id: "is_null", 
        name: "is null", 
        fn: (a) => a === null, 
        type: { "any" : "none" } 
    },
    { 
        id: "is_not_null", 
        name: "is not null", 
        fn: (a) => a !== null, 
        type: { "any" : "none" } 
    }
]
Back to top
If you have not checked yet, be sure to visit site of our main product Webix javascript ui library and page of javascript library list product.