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

Getting Warning for WATCH_ARRAY from vue3 #98

Open
lilz-sofia opened this issue Jun 3, 2024 · 0 comments
Open

Getting Warning for WATCH_ARRAY from vue3 #98

lilz-sofia opened this issue Jun 3, 2024 · 0 comments

Comments

@lilz-sofia
Copy link

Description of the bug
Hi, thank you very much for creating this library and this seemed like a very easy to integrate library for vue3 applications.
However, I am getting the following warning from vue3 after using this library. This is probably due to not using the deep option in the watch functions:

[Vue warn]: (deprecation WATCH_ARRAY) "watch" option or vm.$watch on an array value will no longer 
trigger on array mutation unless the "deep" option is specified. 
If current usage is intended, you can disable the compat behavior and suppress this warning with:

  configureCompat({ WATCH_ARRAY: false })

 Details: https://v3-migration.vuejs.org/breaking-changes/watch.html 
 at <MyTable is-static-mode=true is-slot-mode=true columns= (3) [{…}, {…}, {…}] 
 ... > 

Additional context
This warning usually doesn't show up in the console while using vue3 but since I'm using the vue-migration build (@vue/compat) it is showing this warning. You can find the details on the warning here:
https://v3-migration.vuejs.org/breaking-changes/watch.html

I looked into the watch function in Popper.vue component of your library and found that the watch function that is used for watching [hasContent, disabled], ([hasContent, disabled] is an array on line263. So it is recommended by vue3 to use deep:true option or else it will not trigger re-rendering on mutation of the array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant