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

DropDownTree does not update checked items after setDataSource #4912

Closed
zdravkov opened this issue Mar 14, 2019 · 4 comments
Closed

DropDownTree does not update checked items after setDataSource #4912

zdravkov opened this issue Mar 14, 2019 · 4 comments
Assignees
Labels
Milestone

Comments

@zdravkov
Copy link
Member

Bug report

DropDownTree does not update checked items after setDataSource

Reproduction of the problem

https://dojo.telerik.com/@zdravkov/OCAnuGIR

  1. Open the dojo and press the button

Current behavior

The selected items are not updated

Expected/desired behavior

The selected items should be updated

Environment

  • Kendo UI version: 2019.1.220
@FakeCode
Copy link

I am also waiting for the fix;
Or need an alternate solution i.e remove/clear dynamically the selected value from dropdowntree.

@FakeCode
Copy link

I got my solution
var dropDownTree=$("#dropdowntree").data("kendoDropDownTree");
dropDownTree._getSelection()._clearValue(); ////before setting new datasource clear value
dropDownTree.setDataSource(dataSource);

@Juveniel Juveniel self-assigned this Sep 10, 2019
@nenchef nenchef added the FP: Planned Sync status with associated Feedback Item label Sep 10, 2019
@kendo-bot kendo-bot added FP: In Development Sync status with associated Feedback Item and removed FP: Planned Sync status with associated Feedback Item labels Sep 10, 2019
@kendo-bot kendo-bot added FP: Completed Sync status with associated Feedback Item and removed FP: In Development Sync status with associated Feedback Item labels Sep 13, 2019
@IvanDanchev
Copy link
Contributor

IvanDanchev commented Oct 23, 2019

The issue is still reproducible, if the dataSource is set more than 2 times consecutively:
https://dojo.telerik.com/UcOqEhOh

  1. Click the button 3+ times. The checked items are not updated.

@IvanDanchev IvanDanchev reopened this Oct 23, 2019
@kendo-bot kendo-bot added FP: In Development Sync status with associated Feedback Item and removed FP: Completed Sync status with associated Feedback Item labels Oct 23, 2019
@zdravkov zdravkov added this to the R1 2020 milestone Oct 24, 2019
@Dimitar-Goshev
Copy link
Contributor

@zdravkov After the fix, if the datasource has no checked items and it is set to DDTree through setDataSource method, the DDTree will appear as a 2px line.
To reproduce the issue, use the setup from the Dojo in this comment.

  1. Run the Dojo with the fix - 3 items are checked.
  2. Expand the DDTree and uncheck all items - no items are checked in dataSource1
  3. Click Change data 2 times to load dataSource1 again

Result: the DDTree is 2px high

The same scenario may be tested with directly setting dataSource1 as follows:

          var dataSource1 = new kendo.data.HierarchicalDataSource({
            data: [
              { text: "Option 1", checked: false },
              { text: "Option 2", checked: false },
              { text: "Option 3", checked: false }
            ]
          });

When loading the data initially, the DDTree height is as expected. Then click Change data 2 times to load dataSource1 again
Result: the DDTree is 2px high

@Dimitar-Goshev Dimitar-Goshev modified the milestones: R1 2020, 2019.R3.SP.next Nov 8, 2019
@kendo-bot kendo-bot added FP: Completed Sync status with associated Feedback Item and removed FP: In Development Sync status with associated Feedback Item labels Nov 8, 2019
@mparvanov mparvanov removed this from the 2019.R3.SP.next milestone Jan 13, 2020
@mparvanov mparvanov added this to the R1 2020 milestone Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants