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

Popup isn't always reactive in slot referenced props with v-if #500

Open
1 of 3 tasks
joerattz opened this issue Jun 10, 2021 · 0 comments
Open
1 of 3 tasks

Popup isn't always reactive in slot referenced props with v-if #500

joerattz opened this issue Jun 10, 2021 · 0 comments

Comments

@joerattz
Copy link

Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.

  • I'm submitting a ...
    • bug report
    • feature request
    • support request => Please do not submit support request here, see note at the top of this template.
  • Do you want to request a feature or report a bug?

This is a bug.

  • What is the current behavior?

The bug doesn't happen every time. I'm assuming it's timing related. If I use v-if on a sui-popup, my slot element's referenced props are not always reactive (displaying the latest value).

Here's an example:

<sui-popup v-if="renderPopup" :content="Some hover text">
    <div slot="trigger">IF:  {{firstName}}</div>
</sui-popup>
<div v-else>ELSE:  {{firstName}}</div>

The firstName prop will not always render properly (rendering the most recent value - broken reactivity) in the slot element.

Are you aware that the template recommended above is an angular template?

To reproduce this, you will need to update the firstName and renderPopup prop values multiple times. Also, if I replace renderPopup with true the problem doesn't seem to reproduce.

  • What is the expected behavior?

The expected behavior is for the slot to render with the most recent value of the props it references.

  • What is the motivation / use case for changing the behavior?

So that the component functions properly.

  • Please tell us about your environment:

Vue.js v2.6.11
semantic-ui-vue v0.10.1
Chrome 90.0.4430.212 (Official Build) (64-bit)

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
@joerattz joerattz changed the title Popover isn't always reactive in slot referenced props with v-if Popup isn't always reactive in slot referenced props with v-if Jun 10, 2021
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