Completed
Last Updated: 01 Nov 2022 14:34 by ADMIN
Created by: Ralph
Comments: 2
Category: Badge
Type: Bug Report
0

I was working with a badge widget and I noticed an issue when the value property is specified as 0. It does not change the value displayed in the badge. I have attached a snippet based on the Basic usage demo for a Badge. I originally noticed it because I'm using the badge in MVVM pattern.

 

<!DOCTYPE html>
<html>
<head>
    <base href="https://demos.telerik.com/kendo-ui/badge/index">
    <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
    <title></title>
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2020.1.219/styles/kendo.default-v2.min.css" />

    <script src="https://kendo.cdn.telerik.com/2020.1.219/js/jquery.min.js"></script>
    
    
    <script src="https://kendo.cdn.telerik.com/2020.1.219/js/kendo.all.min.js"></script>
    

</head>
<body>
<div id="example">
    <div class="demo-section k-content">
        <div id="toolbar"></div>
    </div>
    <script>

        $("#toolbar").kendoToolBar({
            items: [
                {
                    template: '<a class="k-button k-badge-overlay" href="#"><span class="k-icon k-i-user"></span><span id="badge-overlay">2</span></a>'
                },
                {
                    template: '<a class="k-button k-badge-overlay" href="#"><span class="k-icon k-i-email"></span><span id="badge-inbox">5</span></a>'
                },
                {
                    template: '<a class="k-button" href="#">See later <span id="badge-sent">15</span></a>'
                },
                {
                    template: '<a class="k-button" href="#">News<span id="badge-missed">99+</span></a>'
                }

            ]
        });

        $('#badge-inbox').kendoBadge({
            type: 'info',
            appearance: 'rectangle'
        })

        $('#badge-sent').kendoBadge({
            type: 'success',
            appearance: 'rectangle'
        })

        $('#badge-missed').kendoBadge({
            type: 'warning',
            value: 0, /*The span has an original value specified in HTML. When it is run, the value doesn't change unless you change it to something other than 0, i.e. 10*/
            appearance: 'rectangle'
        })

        $('#badge-overlay').kendoBadge({
            type: 'primary'
        })
    </script>
    <style>
        #toolbar {
            display: flex;
            justify-content: center;
            height: 80px;
        }

        #example a{
            margin-left: 5px;
        }

        #example .k-icon {
            font-size: 20px;
        }
    </style>
</div>


</body>
</html>
Completed
Last Updated: 01 Nov 2022 14:16 by ADMIN
Release 2020.R2
Created by: Lorenzo
Comments: 1
Category: Badge
Type: Bug Report
0

I've got a problem setting the value to integer 0, as in this sample

It works fine with:

    badge.value('0') instead of  badge.value(0);

 

Please help ... thanks

Completed
Last Updated: 12 Oct 2020 14:46 by ADMIN
Release 2020.R3.SP.next

Bug report
The new text data binding option does not work correctly.

Reproduction of the problem
https://dojo.telerik.com/ezuYuFIp/7


Current behavior
text binding does not bind the value


Environment
Kendo UI version: 2020.3.915
jQuery version: 1.12.3 / 3.5.1
Browser: all