-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Bug report
Toolbar.Items.Group.CustomTool() API of the Scheduler produces an invalid configuration.
Reproduction of the problem
- Open the following Telerik REPL.
- Try to add a Template component via the Toolbar.Custom.Items.Group.CustomTool() API configuration.
- 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]