-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
ryansolid/dom-expressions
#382Labels
enhancementNew feature or requestNew feature or request
Description
I'm trying to reuse the same dom element, and attach it in different places in the ui.
But even though that element is rendered only in one place at a time, solid's rendering of it is not stable.
Sometimes the element is added correctly, sometimes it's removed from the dom completely and sometimes it appears in the wrong spot.
const my_dom_element = document.createElement('div')
return <>
<div>
<Show when={something() === 'foo'}>
{my_dom_element}
</Show>
</div>
<div>
<Show when={something() === 'bar'}>
{my_dom_element}
</Show>
</div>
</>Playground link:
https://playground.solidjs.com/anonymous/d2ce885b-d473-4641-94a6-d9c659bc1e22
I know that this can be "solved" by creating new elements and animating them as if they were the old one. But that is besides the point.
This just seems like something that should work.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request