-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
fix(components): [dropdown] unmounted error #11649
Conversation
🧪 Playground Preview: https://element-plus.run/?pr=11649 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change only avoids the NPE but cannot fundamentally solve the problem. The value of triggeringElementRef
has been cleaned and become undefined when it turns to the onUnmounted
hook. Thus I think it's good to use onBeforeUnmount
instead.
You're right. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
The reason is that when unloading, the used object does not exist.
Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.