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

Slot prop not update when transition finished #6386

Closed
zack9433 opened this issue Jun 5, 2021 · 4 comments · Fixed by #6414
Closed

Slot prop not update when transition finished #6386

zack9433 opened this issue Jun 5, 2021 · 4 comments · Fixed by #6414

Comments

@zack9433
Copy link

zack9433 commented Jun 5, 2021

Describe the bug
If a transition happens on an element that contains a slot which has a prop, the slot prop does not properly update if it is rendered again immediately after the transition ends.

To Reproduce
https://svelte.dev/repl/773209884de04140b5e07e1cff49fbc4?version=3.38.2

Expected behavior
It will update slot prop correctly when finish transition.

Information about your Svelte project:

Chrome v91
macOS 10.15.7
Svelte v3.18.2
See REPL

Additional context

There is a similar issue #3542 and #6042 seems to fix this issue but I guess #6042 don't trigger to update slot prop.

@karolwydmuch
Copy link

Did you try like this?

function blink() {
transitioning = true;

setTimeout(() => {
	test = 'bar1';
	transitioning = false;
}, 500); // if timeout value > duration time and slot prop `test` value will be 'bar'. 
}

@zack9433
Copy link
Author

zack9433 commented Jun 8, 2021

@kaisermann Yes, it is my solution currently. It is a workaround and doesn't solve the root cause.

@kaisermann
Copy link
Member

I think you meant to mention @karolwydmuch 😆

@Conduitry
Copy link
Member

This is fixed now in 3.38.3 - https://svelte.dev/repl/773209884de04140b5e07e1cff49fbc4?version=3.38.3

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

Successfully merging a pull request may close this issue.

5 participants