-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Describe the problem
Check out this REPL.
When you click the "Close" button at the top, the div at the center starts its out transition, and as soon as the transition begins, the state inside of the div stops getting updated.
This might seem trivial or unimportant; but I have encountered numerous situations where I would've preferred Svelte to keep updating the contents as the out transition is happening. (If it's not clear to you when anyone would want that, I could provide examples.)
Describe the proposed solution
I'd propose that the state keeps being updated until the element is present in the DOM, either by default, or at least we should have a modifier (similar to local) that leaves the decision up to the developer:
{#if open}
<div out:fade|keepUpdatingState> <!-- As you can see, I'm horrible at naming, but you get the idea -->
// Blah blah blah...
</div>
{/if}Alternatives considered
Currently, you either have to come to terms with this limitation, or use CSS transitions with CSS classes and then toggle those classes on your element.
Importance
would make my life easier