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

Each blocks with spread attributes on children not updating #1337

Closed
Rich-Harris opened this issue Apr 13, 2018 · 1 comment
Closed

Each blocks with spread attributes on children not updating #1337

Rich-Harris opened this issue Apr 13, 2018 · 1 comment
Labels

Comments

@Rich-Harris
Copy link
Member

REPL. I think what's happening here is that it doesn't believe the first each block to be dynamic; it doesn't recognise that there's a dynamic attribute, so it doesn't bother writing update code. This variant works as expected, because it trips the necessary wire.

@ghost
Copy link

ghost commented Apr 14, 2018

Neither this trigger any wire when you change order of element in the array.
svelte v1.60.3

{{#each tabs as tabID, index }}
  <Tab :tabID :index on:tabReorderStart="hTabReorderStart(event)" on:tabReorderEnd="hTabReorderEnd(event)" /> 
{{/each}}

tabs is a computed property, and tabID is a String not an Object.

computed: {
    tabs: win => { 
        console.log(win.tabs) //this logs data change, no UI change
        return win.tabs
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant