ember-select-2 icon indicating copy to clipboard operation
ember-select-2 copied to clipboard

Pre-selected value is not changed on click on the clear icon

Open fichtenelch75 opened this issue 9 years ago • 4 comments

I use the select-2 with value binding

My controller looks like this:

var campaignStates = Ember.A([ Ember.Object.create({ id: 1, name: 'Running' }), Ember.Object.create({ id: 2, name: 'Paused' }), Ember.Object.create({ id: 3: 'Completed' }), Ember.Object.create({ id: 4, name: 'Stopped' }) ]);

filterCampaignStatusId: 1;

There are four possible values to select. The pre-selected value should be 'Running' with id 1.

In the template is use select-2 like this

{{select-2 content=controller.campaignStates optionLabelPath="name" optionValuePath="id" value=controller.filterCampaignStatusId placeholder="-- Select --" allowClear=true searchEnabled=false}}

select-2 shows the right pre-selected item (Running), but the click on the clear icon does not change the bound value (filterCampaignStatusId) in the controller. Everything works fine if i choose another item and then clear the selection.

fichtenelch75 avatar Jul 16 '15 11:07 fichtenelch75

I have the same issue , any updates about it ?

msalahz avatar Jul 21 '15 09:07 msalahz

Experiencing the same behaviour here.

tmayr avatar Jul 29 '15 16:07 tmayr

Same issue here :(

adamlc avatar Aug 27 '15 11:08 adamlc

Same issue here too. @adamlc PR solves the problem. Please merge into master.

valtlfelipe avatar Oct 14 '15 15:10 valtlfelipe