Completed
Last Updated: 11 Apr 2023 12:48 by ADMIN
Release R2.2023-Increment.2(26.Apr.2023)
Andreas
Created on: 23 Mar 2023 10:25
Category: Toolbar
Type: Bug Report
0
Overflow always does not take effect for template item in the ToolBar

Bug report

When a template item is configured and overflow is set to 'always', the item remains in the main part of the ToolBar (not in the overflow popup). The item is displayed in the oveflow popup only if its text is long e.g. it behaves as its overflow option is set to 'auto'

Reproduction of the problem

  1. Open the Dojo
  2. Resize the rigth pane

Current behavior

The template item is rendered either in the main part of the ToolBar or in the overflow popup, based on the ToolBar`s width

Expected/desired behavior

An item with overflow set to 'always' should be displayed always in the overflow popup.

The issue is a regression starting with 2023 R1 (2023.1.117)

Workaround

The template element is rendered, but with the 'k-hidden' class. Remove the template from the configuration and set only the overflowTemplate. Subscribe to the overflowOpen event and remove the k-hidden class from the needed element:

overflowOpen: function(e){
      setTimeout(function(){
        $('.k-animation-container-shown .k-hidden').removeClass('k-hidden');
      },500)
    },
    items: [
      ....                      
      {
        //template: "<div><label> Labels some text content text text text: </label><input id='labels' style='width: 150px;' /></div>",
        overflowTemplate: "<div><label> Labels: </label><input id='labels' style='width: 150px;' /></div>",
        overflow: "always"
      }
    ]

Dojo - https://dojo.telerik.com/@NeliKondova/UMAvoDEg

Note: The explanation in the following api section should be revised, as the overflow could be set not only to buttons but to the other items as well:

Environment

  • Kendo UI version: 2023.1.314
  • Browser: [all ]
0 comments