-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(drag-handle-vue-2): fix vue2 warnign about objects as default #6857
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(drag-handle-vue-2): fix vue2 warnign about objects as default #6857
Conversation
Vue2 requires factory functions for defaults for objects and arrays. Prevent the warning > Invalid default value for prop "PluginKey": Props with type Object/Array must use a factory function to return the default value. Signed-off-by: Max <[email protected]>
🦋 Changeset detectedLatest commit: a706e4c The changes in this PR will be included in the next version bump. This PR includes changesets to release 69 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 project configuration. |
|
I tried to access The only ways for fixing the other error I see are:
|
|
@bdbch thanks for merging the PR. Would you consider to backport it to the |
) * fix(drag-handle-vue-2): use factory function for default Vue2 requires factory functions for defaults for objects and arrays. Prevent the warning > Invalid default value for prop "PluginKey": Props with type Object/Array must use a factory function to return the default value. Signed-off-by: Max <[email protected]> * Fix prop default handling for Vue 2 --------- Signed-off-by: Max <[email protected]> Co-authored-by: bdbch <[email protected]>
|
Released as |
Changes Overview
classmay not be used as prop.Implementation Approach
Use a factory function.
Testing Done
Checked that it prevents the warning by building text with it:
Verification Steps
Actually testing is cumbersome. Vue 3 seems to have dropped the warning. I'm still checking if that actually also means it's not an issue anymore.
Checking the code and checking the docs is probably best (search for 'factory function')
Additional Notes
I'm still looking into fixing the class reserved name warning.
Checklist
Related Issues
Initially came up in nextcloud/text#7537 (comment)