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

Deeply update objects within arrays #5248

Closed
frederikhors opened this issue Aug 7, 2020 · 1 comment
Closed

Deeply update objects within arrays #5248

frederikhors opened this issue Aug 7, 2020 · 1 comment

Comments

@frederikhors
Copy link

After having read all of #4744 and after having asked svelte-society/recipes-mvp#60 as well, I thought that perhaps this is a situation that has not yet been resolved.

Forgive me if it is already open elsewhere: I could not find it.


REPL: https://svelte.dev/repl/7aca36569aea49bba38e5fb8b1b0835b?version=3.24.1

I can use bind:value={rows[id].qty} or rows=rows but it seems hacky to me.

Expected behavior

Is there a way to use something like: bind:value={row.qty} and still correctly update rows array?

@tanhauhau
Copy link
Member

In the example REPL, I believe what you need is

<Row bind:row={row} />

Also, GitHub issues aren't the right place for support questions like this. Please ask on StackOverflow or in our Discord chat room.

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

No branches or pull requests

2 participants