kendo-angular
kendo-angular copied to clipboard
[DropDownTree] The filtering functionality causes ExpressionChangedAfterItHasBeenCheckedError
Describe the bug When using:
- kendoDropDownTreeFlatBinding with kendoDropDownTreeExpandable directive.
- Setup value binding and initialize the value to a child entry in the list.
- Run and attempt to filter the dropdown. Some searches will produce the error:
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'ng-untouched: true'. Current value: 'ng-untouched: false'.
To Reproduce
Please see the following example: https://stackblitz.com/edit/angular-e7ahkr-dhheph
Steps to reproduce the behavior:
- Open the console while running the example.
- Type "nan" in the dropdown search bar.
- I'm not certain this matters, but notice that both Nancy Davlio and Steven Buchanan are found in the results, and that Steve has child nodes.
- Now press "c" to make the filter "nanc" and the error will occur in the console. This will also cause focus to be removed from the search bar.
might be related to https://github.com/telerik/kendo-angular/issues/3479
Bumping this, since it has become increasingly apparent the more users come into contact with the component on our end and the more unique data is filterable.
Bump
Have any of you stumbled upon a workaround while we wait for the fix? 🤔
We currently avoid using the kendoDropDownTreeFlatBinding and instead have implemented our own recursive search method, hasChildren and fetchChrildren. The code would just be so much simpler if it worked 🤩
Any update in this one? There seem to have been numerous improvements to dropdowntrees in version 15, but this ticket has not been touched?
The fix is available in version 16.2.0.
@stnikolova Tried this out on your documentation page today and even though there is no error in the console anymore, the search input does indeed still lose its focus (see #3479) falling over to then selecting items via the continuously types characters. To be honest just not having an error in the console, does not lead to the problem being fixed (see point 4 of the original reproduction steps mentioned up top).
@KimBum thank you for following up. The focusing issue will be tracked in https://github.com/telerik/kendo-angular/issues/3479.