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

Problem when using $$restProps and dynamic components #5270

Closed
rottmann opened this issue Aug 14, 2020 · 1 comment · Fixed by #5291
Closed

Problem when using $$restProps and dynamic components #5270

rottmann opened this issue Aug 14, 2020 · 1 comment · Fixed by #5291

Comments

@rottmann
Copy link

Describe the bug

Insert dynamically an input item without a value before an existing item with a value, it transmits the value from the old component position to the new.
But only when spreading restProps at the input-element.

To Reproduce

https://svelte.dev/repl/58e9ba4d7977448b8511575f408c80ed?version=3.24.1

Click the button and it inserts at position 1 (between the 2 inputs) a new input.
This input did not has a value, so it should display undefined, but it shows the value of the previous input. (same happens with checkbox, ...)

When you remove {...$$restProps} form Input.svelte it is ok.

@Conduitry
Copy link
Member

This is fixed in 3.25.0 - https://svelte.dev/repl/58e9ba4d7977448b8511575f408c80ed?version=3.25.0

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.

2 participants