Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

下拉框组件虚构时会崩 #269

Closed
18469645 opened this issue Sep 11, 2017 · 4 comments · Fixed by #464
Closed

下拉框组件虚构时会崩 #269

18469645 opened this issue Sep 11, 2017 · 4 comments · Fixed by #464

Comments

@18469645
Copy link

NzDropDownComponent.prototype.ngOnDestroy = function () {
this._subscription && this._subscription.unsubscribe();
};

当页面跳转,调用页面组件里下拉组件的虚构函数时,会崩在这里this._subscription.unsubscribe();。改成这样 this._subscription && this._subscription.unsubscribe();才正常。应该是虚构时this._subscription这个对像已不存在

@wilsoncook
Copy link
Member

Perhaps you call ngOnDestroy (in)directly before nz-dropdown's ngAfterViewInit, the _subscription is initialized at ngAfterViewInit? Would u pls provider more information about your dev scene or code to determine whether needs judging conditions here.

@osbertngok
Copy link

Confirm can reproduce this. May need some time to do a minimal reproduceable case.

@ryancui92
Copy link

ryancui92 commented Oct 18, 2017

+1
the nz-dropdown component remains after navigate to another route.

@lock
Copy link

lock bot commented Feb 19, 2019

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants