Unplanned
Last Updated: 03 Mar 2023 18:28 by Peter
Created by: Peter
Comments: 0
Category: DropDownTree
Type: Feature Request
1

Is it possible to implement an option that enables the auto-expanding of the parent items while filtering?

This functionality is available in Kendo UI for Angular:

https://www.telerik.com/kendo-angular-ui/components/dropdowns/dropdowntree/filtering/#toc-auto-expanding-items-while-filtering

For example:

  • If you search "steven", the result should contain the parent item "Steven Buchanan" and all of its child items:

Completed
Last Updated: 10 Nov 2020 13:46 by ADMIN
Release 2020.R3.SP.next

Bug report

DropDownTreeItemModel does not properly pass its HtmlAttributes members on populating DropDownTree with BindTo()

Reproduction of the problem

In .Net Core application, implement the following view:

@(Html.Kendo().DropDownTree()
    .Name("kendoTreeItems")
    .BindTo((IEnumerable<DropDownTreeItemModel>)ViewBag.Items)
)

and the following controller:

public IActionResult Index()
{
    ViewBag.Items = GetItems();
    return View();
}

public IEnumerable<DropDownTreeItemModel> GetItems()
{
    IDictionary<string, string> attributes = new Dictionary<string, string>
    {
        { "style", "background: red" }
    };

            List<DropDownTreeItemModel> items = new List<DropDownTreeItemModel>
    {
        new DropDownTreeItemModel { Text = "Item 1", HtmlAttributes = attributes },
        new DropDownTreeItemModel { Text = "Item 2", HtmlAttributes = attributes },
        new DropDownTreeItemModel { Text = "Item 3", HtmlAttributes = attributes },
        new DropDownTreeItemModel { Text = "Item 4", HtmlAttributes = attributes },
    };

    return items;
}

Current behavior

The HTML attributes will not be passed to the DropDownTree items.

Expected/desired behavior

The HTML attributes should be passed and present in the DropDownTree items.

Environment

  • Kendo UI version: 2020.1.219
  • Browser: [all]