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

Add default selections using "selected" attribute

Open fmccown opened this issue 11 years ago • 2 comments

It would be fantastic if the selected attribute could be used to specify default or pre-selected options like so:

<select ui-select2 ng-model="mymodel" data-placeholder="Select an item"
      multiple="true">
      <option value="1">One</option>
      <option value="2" selected>Two</option>
      <option value="3">Three</option>
</select>

Then the multiple select would initially show the selected item:

image

instead of:

image

How would you use ui-select2 to load default values in its current state?

fmccown avatar Jun 13 '14 13:06 fmccown

+1.

johnjcorcoran avatar Aug 04 '14 11:08 johnjcorcoran

+1

sjswoboda avatar Aug 07 '14 20:08 sjswoboda