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

Popover: strange reactivity behaviour with @vue/compat #7204

Open
oliver681 opened this issue May 11, 2024 · 0 comments
Open

Popover: strange reactivity behaviour with @vue/compat #7204

oliver681 opened this issue May 11, 2024 · 0 comments

Comments

@oliver681
Copy link

oliver681 commented May 11, 2024

I have a Vue tempate code similar to this one:

<b-button id="button" @click="editingComment=true">
  Click me
</b-button>

<b-popover target="button">
  <template #title>
    <div>Comment is beeing<span v-if="editingComment"> {{ true ? 'edited' : 'created' }}</span></div>
  </template>
  <div id="content">
    Content
  </div>
</b-popover>

Depending on a seemingly unrelated "condition", the title is rendered correctly or not.

I wrote a script that changes the state of editingComment every two seconds. If I make the title of another - seemingly unrelated - popover depend on editingComment, both popovers keep changing their titles according to editingComment. Otherwise, the given popover's title doesn't change.

Steps to reproduce the bug

I couldn't reproduce the case with the working reactivity when using the second seemingly unrelated popover. However, here is an example showing the non-reactivity.

Expected behavior

The expected behaviour is working reactivity as in Vue2 (see documentation). The problem occured after migrating to @vue/compat.

Versions

For used libraries and versions see sandbox.

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