Closed endigo9740 closed 4 months ago
By default, Svelte has SSR enabled. This means that you cannot wrap binded element references with #if statements, as the element will not be contained within the DOM.
#if
We should provide some guidance around this. @Hugos68 suggested:
<div bind:this={elements.floating}> {#if floating.isPositioned} ... {/if} </div>
But this seems to be affecting the position and stying in an adverse manner, so more research is needed.
Note: this can now be added to the /docs/getting-started page. Let's added it towards the bottom.
/docs/getting-started
By default, Svelte has SSR enabled. This means that you cannot wrap binded element references with
#if
statements, as the element will not be contained within the DOM.We should provide some guidance around this. @Hugos68 suggested:
But this seems to be affecting the position and stying in an adverse manner, so more research is needed.
References