Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Initially-selected option gets permanently removed from dropdown list #1675

Closed
andyperlitch opened this issue Jun 21, 2016 · 3 comments
Closed

Comments

@andyperlitch
Copy link

Bug description:

When an initial value is provided (e.g., ng-model is specified prior to the directive compiling), it is shown as chosen, but then does not appear in the list thereafter.

Link to minimally-working plunker that reproduces the issue:

The "basic" demo with a single line modification and version update

Version of Angular, UI-Select, and Bootstrap/Select2/Selectize CSS

Angular: 1.5.0
UI-Select: 0.17.1

ui-select-issue

(sorry for the slowed-down gif, not sure why its slow)

@andyperlitch
Copy link
Author

More info: I'm 100% sure it has to do with lines 234-249 of uiSelectController.js, but I'm not familiar enough with the codebase to make an acceptable fix.

@andyperlitch
Copy link
Author

This issue actually duplicates #1660, so my apologies. I'll close mine, but perhaps my plunker and issue title will be of some use to people with the same problem..

@muni510
Copy link

muni510 commented May 30, 2017

add remove-selected="false" option to ui-select directive

<ui-select ng-model="ctrl.person.selected" theme="bootstrap" remove-selected="false">

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants