kendo-angular icon indicating copy to clipboard operation
kendo-angular copied to clipboard

Editor value cannot be reset manually when used in Angular Forms

Open mbechev opened this issue 2 years ago • 5 comments

Describe the bug The value of the Editor cannot be reset multiple times when used in a Reactive and Template driven Form.

Trying to set an empty string through the built-in Form methods (setValue, patchValue), the Editor values don't seem to reflect the changes and cannot be reset.

Template driven: https://user-images.githubusercontent.com/49076727/169473360-0ffe6049-15d5-4fa9-9005-f04961972c2e.mp4

To Reproduce Reactive - https://stackblitz.com/edit/angular-qlotxv-dsak9w Template driven - https://stackblitz.com/edit/angular-x8uhrs-nns2sc?file=src%2Fapp%2Fapp.component.ts

  1. Clear the initial value with the button.
  2. Type in the Editor.
  3. Clear the new value with the button.

If setting any truthy value through the Form methods, the Editor behaves as expected.

https://stackblitz.com/edit/angular-qlotxv-8tuccn

Workaround Template driven: https://stackblitz.com/edit/angular-x8uhrs-ekfxvb?file=src%2Fapp%2Fapp.component.ts

mbechev avatar May 11 '22 12:05 mbechev

Actually truthy values does not work as well. Here is an example: https://stackblitz.com/edit/angular-fusva7?file=src%2Fapp%2Fapp.component.ts

Press Load do some editing, then press Load again. The value in the editor remains the edited one and is not set to the one that is patched/resetted in the form.

PeterStaev avatar Dec 06 '22 13:12 PeterStaev

Got the same issue for the editor component. Managed to fix using workaround: to empty the editor you need to implement a rotation of empty values (ex. '', ' ') and when you empty the value, use one of those sequentially.

Hope for fix in the nearest future

ggegelya avatar Jan 27 '23 11:01 ggegelya

Same here, unable to set empty string as editor value, after an http post operation. Hope for fix in the nearest future.

postmeback avatar Feb 14 '23 05:02 postmeback

I am also getting issues while setting empty values to the Kendo editor and in validations. please solve this issue on priority.make it compatible with form controls.

belotesagar avatar Sep 27 '23 08:09 belotesagar

I also experience this bug. Hopefully it gets fixed soon. In the meantime, reseting and setting the value again does the job for me. (Angular 16/17, Kendo 14.1)

danielxbauer avatar Nov 16 '23 08:11 danielxbauer