Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

selectedModel not set on initial selection #33

Open
omerts opened this issue Feb 5, 2015 · 2 comments
Open

selectedModel not set on initial selection #33

omerts opened this issue Feb 5, 2015 · 2 comments

Comments

@omerts
Copy link

omerts commented Feb 5, 2015

Hello,

I am trying to use the selectedModel after selecting an item, but when the first item is selected selectedModel only has an empty object. From the second selection on, everything works as expected.
I have a binding on "on-core-select" that logs the selectedModel only when detail.isSelected is true.
This is what I see:
image
After the first selection, if I select the first item in the list again, it also works fine, so it's not that the first item is missing a model.

@michaelpg
Copy link

The bug I'm seeing is slightly different: selectedModel is not updated until after any core-select event handlers are called. I guess this is because selectedItemChanged isn't called until after all of
core-select's event handlers have been executed?

@orenb
Copy link

orenb commented Mar 17, 2015

+1 to michaelpg's comment -- I just encountered the same issue and found it rather counterintuitive :/

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

No branches or pull requests

3 participants