ember-typeahead icon indicating copy to clipboard operation
ember-typeahead copied to clipboard

Cannot use more than one acomplete field

Open kristjanreinhold opened this issue 11 years ago • 1 comments

Got it working nicely on my first input , i changed ember select with it and got it styled. But on my formset, i've another autocomplete field. The second autocomplete field fetched the same data as first. (Same output on both of them.).

Route

controller.set('organizations', this.store.findAll('agents/organization')); controller.set('dbcountries', this.store.findAll('agents/geography/countries')); Models

var Organization = DS.Model.extend({ name: DS.attr('string'), });

Organization.FIXTURES = [ { id: 1, name: 'TU', }, { id: 2, name: 'TLU', } ];

'var Countries = DS.Model.extend({ code: DS.attr('string'), name: DS.attr('string') });

Countries.FIXTURES = [ { id: 1, code: 'est', name: 'Estonia' }, { id: 2, code: 'fin', name: 'Finland' } ]; HBS

This works properly

{{type-ahead data=organizations name="name" selection=field.myColour placeholder="Organizations" class="form-control"}}

This gives results of organization.

{{type-ahead data=dbcountries name="code" selection=field.country placeholder="Countries" class="form-control"}}

kristjanreinhold avatar Jan 09 '14 11:01 kristjanreinhold

Also experiencing this issue. All typeaheads on a page use the same data as the first typeahead.

ninjatronic avatar Apr 17 '14 15:04 ninjatronic