Completed
Last Updated: 12 Sep 2024 06:28 by ADMIN
Release 2024 Q4 (Nov)
SturmA
Created on: 06 Jun 2024 08:06
Category: Scheduler
Type: Bug Report
1
Toolbar.Custom.Items.Group.CustomTool() API of the Scheduler produces an invalid configuration

Bug report

Toolbar.Items.Group.CustomTool() API of the Scheduler produces an invalid configuration.

Reproduction of the problem

  1. Open the following Telerik REPL.
  2. Try to add a Template component via the Toolbar.Custom.Items.Group.CustomTool() API configuration.
  3. Notice that the configuration produces invalid serialization.

To give more context, the Toolbar's buttonGroup items do not expose, nor should they expose a template configuration. The currently available options advocate that each of the buttons must apply options similar to that of the ToggleButton.

Thus, making the wrapper configuration not applicable. The following dojo verifies this - https://dojo.telerik.com/@alexander64836/ayedUsAh

Current behavior

Toolbar.Custom.Items.Group.CustomTool() API configuration of the Scheduler produces an invalid configuration which is not serialized accordingly.

Expected/desired behavior

Toolbar.Items.Group API configuration of the Scheduler should expose a CustomTool() API configuration for the ButtonGroups.

Workaround

The current workaround would be to declare the CustomTool via the Toolbar.Custom.Items.CustomTool() API configuration. And a ButtonGroup via the Template component:

@(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.TaskViewModel>()
     .Name("scheduler")
     ...
     .Toolbar(t => t.Custom(c =>
         c.Items(itm => {
             itm.CustomTool(Html.Kendo().Template().AddComponent(c => c
                .ButtonGroup()
                 .Name("select-period")
                 .Items(t =>
                 {
                     t.Add().Text(string.Empty).Icon("chevron-up");
                     t.Add().Text(string.Empty).Icon("chevron-down");
                 })
             ));  
          })
       )
     )
)

The following Telerik REPL illustrates this approach.

Environment

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