Title: Creating a new FormGroup instance for the same
Open Graph Title: Creating a new FormGroup instance for the same
X Title: Creating a new FormGroup instance for the same
Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description If a form is initialized multiply times with a new FormGroup, default disabled states of the controls will not apply. It seems, that the fo...
Open Graph Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description If a form is initialized multiply times with a new FormGroup, default disabled states of the contro...
X Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description If a form is initialized multiply times with a new FormGroup, default disabled states of the contro...
Opengraph URL: https://github.com/angular/angular/issues/44478
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Creating a new FormGroup instance for the same \u003cform> Element does not initialize disabled states correctly","articleBody":"### Which @angular/* package(s) are the source of the bug?\r\n\r\nforms\r\n\r\n### Is this a regression?\r\n\r\nNo\r\n\r\n### Description\r\n\r\nIf a form is initialized multiply times with a new FormGroup, default disabled states of the controls will not apply.\r\n\r\nIt seems, that the form states (enabled/disabled) are somehow cached in the view. So, as a workaround, I destroyed the view and created a new one. You can see the workaround in the stackblitz, too.\r\n\r\n### Please provide a link to a minimal reproduction of the bug\r\n\r\nhttps://stackblitz.com/edit/angular-ivy-6fg5hd?file=src%2Fapp%2Fapp.component.ts\r\n\r\n### Please provide the exception or error you saw\r\n\r\n```true\r\nThe view is not rendered correctly / form controls have wrong enabled/disabled states.\r\n```\r\n\r\n\r\n### Please provide the environment you discovered this bug in (run `ng version`)\r\n\r\n```true\r\n\r\n _ _ ____ _ ___\r\n / \\ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|\r\n / △ \\ | '_ \\ / _` | | | | |/ _` | '__| | | | | | |\r\n / ___ \\| | | | (_| | |_| | | (_| | | | |___| |___ | |\r\n /_/ \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_| \\____|_____|___|\r\n |___/\r\n\r\n\r\nAngular CLI: 13.1.1\r\nNode: 14.17.2\r\nPackage Manager: npm 6.14.13\r\nOS: darwin x64\r\n\r\nAngular: 13.1.0\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... platform-browser, platform-browser-dynamic, router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1301.1\r\n@angular-devkit/build-angular 13.1.1\r\n@angular-devkit/core 13.1.1\r\n@angular-devkit/schematics 13.1.1\r\n@angular/cli 13.1.1\r\n@schematics/angular 13.1.1\r\nrxjs 6.6.7\r\ntypescript 4.5.4\r\n```\r\n\r\n\r\n### Anything else?\r\n\r\nThe stackblitz example is built with Angular 12, but the same bug appears on a local ng13 project.","author":{"url":"https://github.com/BaggersIO","@type":"Person","name":"BaggersIO"},"datePublished":"2021-12-14T15:38:24Z","url":"https://github.com/angular/angular/issues/44478"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6080e63f-a8e2-867d-82d3-e3ab1dc0f15d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E6C:3A73AA:111D568:15A0992:6B0152A2 |
| html-safe-nonce | 4d3b2f4306e2acfdc55dcc121c26248af40bd9dd89808f1d6baa40cfa4ba12aa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTZDOjNBNzNBQToxMTFENTY4OjE1QTA5OTI6NkIwMTUyQTIiLCJ2aXNpdG9yX2lkIjoiMzI0MzgyMzI0NTYzMjAyNzIyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | fc69b9746377a4850443bfd2c62cf8ac70045b6963a4b78cd3a312d0954cc784 |
| hovercard-subject-tag | issue:1079909228 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/44478/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8d067892af604d1efbaab178724410f0ec044493302e3edaf88c8b24d0367eed/angular/angular/issues/44478 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8d067892af604d1efbaab178724410f0ec044493302e3edaf88c8b24d0367eed/angular/angular/issues/44478 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description If a form is initialized multiply times with a new FormGroup, default disabled states of the contro... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | BaggersIO |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width