Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alestoya opened this issue Jun 6, 2024 · 0 comments

Comments

@alestoya
Copy link

alestoya commented Jun 6, 2024

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]
@alestoya alestoya added this to the 2024 Q3 (Aug) milestone Jun 6, 2024
@github-actions github-actions bot added the FP: Planned Sync status with associated Feedback Item label Jun 6, 2024
@alestoya alestoya changed the title Toolbar.Custom.Items.Group.CustomTool() API configuration of the Scheduler produces an invalid configuration Toolbar.Custom.Items.Group.CustomTool() API of the Scheduler produces an invalid configuration Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant