emberjs/ember.js — Issue #481: Changing data bound to Ember.Select doesn't update selection
Author: martinstein
Created: 2012-02-08 11:06:28+00:00
State: open

First of all, here's a jsfiddle that demonstrates the problem:

http://jsfiddle.net/KPXYd/4/

When the data behind the Select view changes, the options are correctly updated, but the new selected item is **not** selected. When stepping through the code, it seemed to me that the following happens:

1. The `selectionBinding` is updated first and the new selection gets highlighted (possibly on the old `content` ?)
2. The `contentBinding` is updated next, and thus the options get re-rendered and the highlighted selection gets 'lost'.

I'm not sure if the above is actually the cause. Maybe someone else can look into it.