Skip to content

WATCH_ARRAY in @vue/compat is triggered by CoreModal.vue #390

@codepainters

Description

@codepainters

Version

vue-final-modal: 4.4.5
vue: 3.3.4
@vue/compat: 3.3.4

What is Expected?

Warning-free execution.

What is actually happening?

This calll to watch() triggers a warning from @vue/compat:

watch(() => [props.zIndexFn, index.value], () => {
if (visible.value)
refreshZIndex(index.value)
})

Actually the warning is legit, as far as I udnerstand the Vue docs:

When you call watch() directly on a reactive object, it will implicitly create a deep watcher - the callback will be triggered on all nested mutations.
This should be differentiated with a getter that returns a reactive object - in the latter case, the callback will only fire if the getter returns a different object.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions