getValue of ui.filter, Methods Webix Docs
returns the value set for the filter
object getValue();
| object | an object with rules and fields for filtering |
Example
var value = $$("$filter1").getValue();
Details
The returned object with rules and fields looks as follows:
{
condition: {filter: "10000", type: "<"},
includes: [1994, 1972, 1966, 1964, 1957]
}
The structure of the value:
- for type:"number" and type:"text"
{
condition: {filter:"abra", type:"contains"},
includes:[
/* values that match the criteria */
]
}
- for type:"date"
{
condition:{
filter:{
start:Wed Jan 08 2020 00:00:00 GMT+0300 (Moscow Standard Time),
end:Tue Feb 11 2020 00:00:00 GMT+0300 (Moscow Standard Time)
}
}
}
Where:
- condition - a set of filtering conditions with the following properties:
- filter - the entered filter value;
- type - the filter rule;
- includes - an array of selected values. If values are not selected - the parameter will return an empty array.
- start, end - a Date object for the start / end date (for "date" type).
See also