i am working with ui-select-match and ng-repeat
i have an array with five values as shown below in occurrence.
My code is working fine except that when i select first option all disappears from the dropdown and after that if when i select "second"
than "all" shows up in dropdown options.
here is my html code
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-3" id="sdlPrdAddS_sdlAvlF_awkC">
<div class="formElement" id="sdlPrdAddS_sdlAvlF_awk">
<p id="sdlPrdAddS_sdlAvlF_awkL">
<label>{{'healthcareService.addSchedule.availability.occurrence' | translate}}</label><span class="red">*</span></p>
<ui-select multiple name="occurrenceInMonth" data-ng-model="scheduleFormObj.daysOfWeekInput.occurrence" id="sS_adR_occureence" on-select="removeExtraFields()" ui-select-required="true">
<ui-select-match placeholder="{{'healthcareService.addSchedule.scheduleDetails.select' | translate}}">
{{$item}}
</ui-select-match>{{occurrence}}
<ui-select-choices repeat="occurrence in scheduleStaticObjs.occurrence">
<div ng-bind-html="occurrence"></div>
</ui-select-choices>
</ui-select>
</div>
</div>
My object is this:
scheduleStaticObjs.occurrence =
["All","First","Second","Third","Fourth","Fifth"]
I think you might want to check what happens in your on-select="removeExtraField()" as it might be the problem
Check out this jsfiddle to see a working version of what you might need
The JS below:
Hope this helps