primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.62k stars 4.63k forks source link

Editor: reactive forms setValue does not work while editor formControl is in dialog that is not visible #16825

Open stefanbildl opened 1 week ago

stefanbildl commented 1 week ago

Describe the bug

When i embed the editor component in a (currently not shown) dialog component and call setValue on the FormControl, the control's value does not update because the editor is not attached to the DOM.

this is because the "delayedCommand" command is never executed.

My proposition: remove delayedCommand, and execute the command immediately.

Environment

Dialog with Editor component

Reproducer

No response

Angular version

18.0.0

PrimeNG version

17.18.12

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

22.9.0

Browser(s)

No response

Steps to reproduce the behavior

Place editor component in a dialog (as a reactive FormControl).

set dialog to non visible

call setValue on FormControl

-> nothing is updated

Expected behavior

Value should be updated