-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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(vue-3): custom node views when using class components #5410
Conversation
🦋 Changeset detectedLatest commit: 9de917e The changes in this PR will be included in the next version bump. This PR includes changesets to release 54 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for tiptap-embed ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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 checks out for me too
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.
Looks good for me too
Changes Overview
Enables using Vue 3 class-based components as node views.
Implementation Approach
Because of the way
VueNodeView
extends a custom node view, a class-based component needs to be "unwrapped" before it can be used – a good opportunity to do this seems to be in theVueNodeViewRenderer
function where theVueNodeView
is constructed.Checking and unwrapping is done using the same approach as in the vuejs implementation, see runtime-core/src/component.ts#L1174 for the check and runtime-core/src/vnode.ts#L580 for the unwrapping code.
Testing Done
Is in use and working in my app.
Verification Steps
Additional Notes
Checklist
Related Issues