Incorrect indetermined state when filtered

4 posts, 0 answers
  1. Hello
    Hello avatar
    2 posts
    Member since:
    May 2017

    Posted 10 Aug Link to this post

    Let's say we have this tree: A -> B -> [C,D]  where A = root node, B = childnode of A, nodes C and D are children of B).

    When I check node C or D without filters applied, nodes A and B get the indeterminate state correctly. 

    However, when I apply a filter (i.e. text contains C), node D get's hidden. When I now check node C, both nodes A and B also get checked, while they should be indeterminate since node D is not checked.

    Using Kendo UI version 2017.2.621, OS Windows 10, Chrome 59.0.3071.115 (64-bit), jQuery version 1.12.4

    Attached files:

    • Initial state
    • Checked C with filter applied
    • Removed filter with C being checked (incorrect indeterminate state for A and B)
    • Expected result (after removing filter, but should also have indeterminate state when filtering is still applied)
  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1326 posts

    Posted 14 Aug Link to this post

    Hello,

    We are not sure what nodes showing/hiding logic you use when filtering the TreeView, however here's a dojo example in which the parent node has a indeterminate state correctly applied when only one of its children is checked. Search for the node with text "aaa" for instance. "bbb" and "ccc" will be hidden and if you check "aaa" its parent "child1" and the root node ("Root1") state will change to indeterminate not to checked.

    Regards,
    Ivan Danchev
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Hello
    Hello avatar
    2 posts
    Member since:
    May 2017

    Posted 14 Aug in reply to Ivan Danchev Link to this post

    Hello Ivan,

    I am using the DataSource.filter function to apply filtering to the data. I expected the TreeView to understand the difference between filtered data and unfiltered data, but that doesn't seem the case.

  4. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1326 posts

    Posted 16 Aug Link to this post

    Hello,

    Indeed, as opposed to hiding nodes, when filtering them through the dataSource's filter method the nodes that are filtered out (not displayed) are not counted on determining the parent node's status (checked/unchecked/indeterminate).

    Regards,
    Ivan Danchev
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top