This is a migrated thread and some comments may be shown as answers.

Badge: Issues (1 of 2)

1 Answer 25 Views
Button (Mobile)
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 22 Nov 2013, 12:32 AM
ISSUE #1:

I tested and found you can not apply a badge with value of 0 (zero).
I can understand the original logic why - however it is problematic with dynamic updates of the value via jQuery.   Instead of it  disappearing it does nothing and leaves the old value.
<div id="foo" data-role="view">
  <a data-role="button" data-badge="1" data-click="resetClicks">Reset Badge Count</a>
</div>
 
<script>
var app = new kendo.mobile.Application();
 
function resetClicks() {
    this.badge(0); //set new badge value
}
</script>

You might consider adding another option flag:  data-badge-showzeros to handle all possibilites of user needs. Some may want to show Zero values and other not.

1 Answer, 1 is accepted

Sort by
0
Kamen Bundev
Telerik team
answered on 26 Nov 2013, 09:08 PM
Hello Craig,

Thank you for noticing this. I've just fixed it and the fix will be available with the next internal build. I've also updated your points for the find.

Regards,
Kamen Bundev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Button (Mobile)
Asked by
Craig
Top achievements
Rank 1
Answers by
Kamen Bundev
Telerik team
Share this question
or