-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Description
First, thanks for the codelab-components! It's awesome and really useful to have opensourced this :)
I'm having an issue with resume not fired up. Adding some debug, I observed that this.state doesn't keep the same value in _stateLoaded before and after this.async() call.
I added some debug logs in _stateLoaded:
_stateLoaded: function() {
console.log("State loaded: " + this.state.stepIndex)
// allow everything render and initialize,
// especially this.steps which runs at the same init level
// as iron-localstorage (on attached).
this.async(function() {
console.log("Resume check: " + this.state.stepIndex)
[…]
}, 500);
},
So, here is what I'm seeing, on page load:
State loaded: 2
Resume check: 0
As you can see, this.state.stepIndex has changed. This is due to _selectedChanged being fired in between due to steps being initialized on attach.
One way could be to prevent the this.set('state.stepIndex', this.selected); assignement on attach via a loading variable, do you think of a better fix? (It sounds wrong to change this.selected, as resume isn't selected at this point).
Metadata
Metadata
Assignees
Labels
No labels