Badge showing when 0?

Hi,

According to the help text, the Badge on a Icon button should be hidden when 0 or blank. But in my app it is still showing when value is 0 or empty string. Is this a bug ?

image
image

Hi Preben,

There is a known bug where data bound values are not showing as expected in the Badge. This is known for the built-in Object Count property, and may be true for your custom “Comment Count” property too. We are working on a fix for this.

In the meantime, for the Icon Button component, a simple workaround is to use a function to return the length of the datasource, for example using Posts.length. Here the badge will behave as expected.

Please note that returning a string value “0” will cause the badge to show, the numerical value of 0 or an empty string must be returned for the badge to disappear.

Rhys

1 Like

Any fixes for this?
I’m having the same problem where my badge is databound to a runtime property of an object.
image


image

Any updates on this? Am i doing something wrong when i use .length?

Hi!

It seems that this was fixed about a year ago, and I’ve verified that setting up the same scenario as in your screenshots does not display any badge if the count/length is 0.