angular-select2 icon indicating copy to clipboard operation
angular-select2 copied to clipboard

Directive assumes that the identity field is always called "id"

Open simonmarklar opened this issue 11 years ago • 0 comments

Hi,

When a datasource contains objects that dont use id as the name of the id field, the ngModel is not populated. eg

[
    { key: 1, name: 'Foo'}, 
    { key: 2, name : 'Bar' }
]

I have gotten it to work by modifying the source, but I'm not sure if my solution is the way you want to go (added an id attribute that defaults to "id", then used that value to reference the datasource objects id field )

simonmarklar avatar Dec 03 '14 04:12 simonmarklar