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

Unexpected change event triggering when using DropDownTree's value() method or value option #4352

Closed
Juveniel opened this issue Jul 3, 2018 · 2 comments

Comments

@Juveniel
Copy link
Contributor

Juveniel commented Jul 3, 2018

Bug report

The change event of the DropDownTree is called twice when the value() method or value option is used.

Reproduction of the problem

The issue can be observed on the following Dojo example.

Current behavior

Change event is triggered two times.

Expected behavior

Change event is NOT triggered by value method or value option, as its documentation highlights that "The event is not fired when the value of the widget is changed from code." Value method documentation also highlights that "This method does not trigger change event"

Environment

  • Kendo UI version: 2018.2.620
  • Browser: [all]
@zdravkov zdravkov added this to the 2018.R2.SP.next milestone Jul 10, 2018
@Dimitar-Goshev Dimitar-Goshev changed the title change event triggered two times upon using the value() method or the value option Unexpected change event triggering when using DropDownTree's value() method or value option Jul 16, 2018
@Dimitar-Goshev
Copy link
Contributor

Dimitar-Goshev commented Jul 16, 2018

After the fix if the value is set to an empty string and then an item is selected from the dropdown, the change event is not triggered. To reproduce it, use the setup of the Dojo from the description with latest scripts. Set value as follows:

    var dropdowntree = $("#dropdowntree").data("kendoDropDownTree");
    dropdowntree.value("");

Expand the dropdown and select an item.
Expected: change is fired.
Actual: change is NOT fired.

The issue is also reproducible if an item is selected, then the value is set to an empty string and then an item is selected from the dropdown.
NOTE: not reproducible in checkbox scenario.

@Dimitar-Goshev
Copy link
Contributor

After the latest fix, change event is not triggered on setting initial value in single selection mode. Then change is triggered as expected, when selecting/clearing items.
But in checkboxes scenario, change event is not triggered at all, if initial value is set. Changing checked items does not trigger change...

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

5 participants