-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
Docs indicate passengers
is not required for Wormhole.open
, but without them the call immediately returns
#247
Comments
You're right, Thanks for bringing it up! About what you are trying to do: That's not gonna work, the Wormhole isn't mean to actively pull from a I think all you need it to use the <portal :name="content1Id" :disabled="!content1Active" slim>
<div>The content of my portal when I send it</div>
</portal>
<portal :name="content2Id" :disabled="!content2Active" slim>
<div>The content of my portal when I send it</div>
</portal> |
@LinusBorg, while that solution works in my trivial reproduction example, my real use-case is having a sharable flyout component that can be used by multiple components distributed across my app. So, managing enabled/disabled state of each content area sharing the flyout could become pretty non-trivial in that instance, though not necessarily impossible. At the very least it, I think it would probably require some type of If I understand correctly, the It seemed like natural functionality to me, and was how I was assuming it would work. In fact, I added about four lines of code to the dist file and it seemed to work that way reasonably well, but I understand if there are edge cases that would go haywire if you tried to do that. Or if you just think it's not explicit enough. Just trying to understand 👌 |
I only added The What you propose would indeed work with one caveat: the code calling I'll think a bit about your proposal though, it might work fine. Forrest for all the trees... |
Ok, cool. Thanks for taking the time to read my thoughts. For now I'll try to figure out something elegant I can do to handle it in userland. |
From what I understand on the docs here, when I'm using
Wormhole.open
I don't have to provide the passengers argument forWormhole.open
, which I assume would mean that the content sent would be whatever children are in thefrom
portal when theopen
is called. However, after trying this, it doesn't seem to work (at least not the way I expect), and after digging into the source, I see this:Anyways, here's a repro of what I'm trying to do. I would think it would toggled different portal contents into the given portal target, but it's not working as expected.
The text was updated successfully, but these errors were encountered: