When using the Filter control and configuring the Fields, if a 'number' type field is used, the value 0 (zero) is ignored, for example:
$("#filter").kendoFilter({ dataSource: dataSource, expressionPreview: true, fields: [ { name: "age", type:"number", defaultValue: 31 }, {name: "foo", type: "number", defaultValue: 0}, { name: "name", type:"string", defaultValue: "Rick" } ] });
'age' and 'foo' are both 'number' type fields, but the default value of 'foo' will be ignored when the filter is chosen in the UI.
Here is a runnable example of this, notice how when selecting 'age' from the fields dropdown, the value correctly defaults to 31, but selecting the 'foo' field will not have the value populate correctly:
Hi Devon,
Thank you for reporting the behavior to us. The developers will look into it as soon as possible.
As a token of gratitude for bringing the issue to our attention I have updated your Telerik points.
Regards,
Viktor Tachev
Progress Telerik
I have found that the issue also extends to boolean values and specifying a default value of "false"
My guess is that the values of "0" and "false" aren't being interpreted as a flag to indicate if there is a default value, and not what the default value actually is.
I've included a separate dojo that illustrates this, I apologize for my incorrect link from earlier.
Notice how the two boolean fields both have default values, but only the "true" value appears in the expression preview.