Last Updated: 06 Oct 2020 14:11 by ADMIN
Release 2020.R1.SP1
Created on: 04 Oct 2019 14:41
Category: Filter
Type: Bug Report
Filter Control: 'Default Value' on 'number' type field will not accept 0 (zero)

When using the Filter control and configuring the Fields, if a 'number' type field is used, the value 0 (zero) is ignored, for example:

    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:

Viktor Tachev
Posted on: 11 Oct 2019 11:26

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.


Viktor Tachev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Posted on: 10 Oct 2019 17:55

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.