form icon indicating copy to clipboard operation
form copied to clipboard

Reactive forms model not updated after initialization.

Open arrow-dev opened this issue 6 years ago • 0 comments

This is a...

  • [ ] feature request
  • [ ] bug report
  • [*] usage question

What toolchain are you using for transpilation/bundling?

  • [*] @angular/cli
  • [ ] Custom @ngTools/webpack
  • [ ] Raw ngc
  • [ ] SystemJS
  • [ ] Rollup
  • [ ] Other

Environment

NodeJS Version: 10.14.1 Typescript Version: 3.1.4 Angular Version: 7.1.2 @angular-redux/store version: 9.0.0 @angular/cli version: (if applicable) 7.1.2 OS: Windows 10/ MacOs

Link to repo showing the issus

(optional, but helps a lot)

Expected Behaviour:

When a connected form is initialized where values are already set in the store (such as opening a form to edit some previously set value, or going back in browser history to a previous page) the values in the form model should be updated to reflect the values in the store?

Actual Behaviour:

When a connected form is initialized where the values are already set in the store, the values in the DOM are populated but the form model is not updated until editing the form or triggering change detection some other way. Should this type of pattern work or do I need to check for the values in the store when initializing the form and set them explicitly?

arrow-dev avatar Dec 11 '18 22:12 arrow-dev