Closed IvanDanchev closed 4 years ago
The unexpected result is caused by the fact that upon blurring the MultiSelect input field, the filter text is being cleared. Upon clearing the filter, the MultiSelect should return the full data in the DataSource to its view. Therefore, the requestEnd
event gents fired with type read
. After that, the requestEnd
event also gets fired with type create
. The change is introduced with the following fix:
https://github.com/telerik/kendo/commit/ceca71b61fe6041575813dde40df73f63ea7f95f#diff-d49530520f78dc5b384ff72c7fc5a08c
Having that said, I will change the implementation of the demos to respect the above (expected) behavior of the MultiSelect widget.
The following updated Dojo snippet shows the proper implementation. The change is as follows:
Bug report
When a new item is added and the dataSource's sync method is called, the requestEnd event handler data (arg.type) returns the type of request as "read", instead of "create". As a result, the Add new item demo does not work as expected, because it has a check for the type of the request in the requestEnd handler, and expects the request to be "create". Since the request type comes out as "read" the logic for selecting the newly added item is not executed.
In previous versions the request has been correctly identified as "create". The issue is exhibited only in the MultiSelect. The ComboBox and the DropDownList return the request as "create".
This behavior has been introduced in R3 2017. Reproducible in Chrome, Firefox and Chromium Edge. Not reproducible in IE11 and Spartan Edge.
As a workaround the addNew function can be modified as shown below:
Reproduction of the problem
Dojo example.
Current behavior
The event data returns "read" as the type of the request.
Expected/desired behavior
The event data returns "create" as the type of the request.
Environment