Closed Cyclone77 closed 2 years ago
https://stackblitz.com/edit/angular-omojih
The content entered on the drawer, the expanded tree, disappeared after reopen the drawer, and returned to the first time.
Drawer close does not cancel DOM, reopen or previous interface status
Re-opening the drawer re-rendering the content
ENVIRONMENT | INFO |
---|---|
Ng-Zorro-ANTD | 12.1.0 |
Browser |
申请不使用nzDrawerContent 模板来渲染,使用
@Cyclone77 将内容投影移动到弹窗内会产生很多意外的问题,因此我从 v12 开始不再支持。直到 https://github.com/angular/angular/issues/8563 得到解决。
另外从开发角度上来说所有的输入内容应该都保存在 viewmodel 中,而不是在 view 中。
Reproduction link
https://stackblitz.com/edit/angular-omojih
Steps to reproduce
抽屉上输入的内容,展开的树,重新打开抽屉后消失了,恢复到第一次打开的状态了。
What is expected?
抽屉关闭不注销dom,重新打开还是之前的界面状态
What is actually happening?
重新打开抽屉重新渲染了内容