ui-disable-choice not working #1983
Description
The issues forum is NOT for support requests. It is for bugs and feature requests only.
Please read https://github.com/angular-ui/ui-select/blob/master/CONTRIBUTING.md and search
existing issues (both open and closed) prior to opening any new issue and ensure you follow the instructions therein.
Bug description:
directive: ui-select-choices attribte: ui-select-disable-choice not working as expected
Link to minimally-working plunker that reproduces the issue:
Can't reproduce it in plunkr
<ui-select ng-model="ComputeInstancesBackupAgentsModifyController.operationalWindowEndTime" ng-change="ComputeInstancesBackupAgentsModifyController.onOperationalWindowEndTimeChange($select.selected.value)" search-enabled="false"> <ui-select-match> <span ng-bind="$select.selected.label"></span> </ui-select-match> <ui-select-choices ui-disable-choice="time.value == '00:00'" repeat="time in (ComputeInstancesBackupAgentsModifyController.availableSchedulTimes | filter: $select.search) track by $index"> <span ng-bind="time.label"></span> </ui-select-choices> </ui-select>
and this is my object in my controller:
controller.availableSchedulTimes = [ { 'label': '- None -', 'value': null }, { 'label': '00:00', 'value': '00:00' }, { 'label': '01:00', 'value': '01:00' }, { 'label': '02:00', 'value': '02:00' }, { 'label': '03:00', 'value': '03:00' }, { 'label': '04:00', 'value': '04:00' }, { 'label': '05:00', 'value': '05:00' }, { 'label': '06:00', 'value': '06:00' }, { 'label': '07:00', 'value': '07:00' }, { 'label': '08:00', 'value': '08:00' }, { 'label': '09:00', 'value': '09:00' }, { 'label': '10:00', 'value': '10:00' }, { 'label': '11:00', 'value': '11:00' }, { 'label': '12:00', 'value': '12:00' }, { 'label': '13:00', 'value': '13:00' }, { 'label': '14:00', 'value': '14:00' }, { 'label': '15:00', 'value': '15:00' }, { 'label': '16:00', 'value': '16:00' }, { 'label': '17:00', 'value': '17:00' }, { 'label': '18:00', 'value': '18:00' }, { 'label': '19:00', 'value': '19:00' }, { 'label': '20:00', 'value': '20:00' }, { 'label': '21:00', 'value': '21:00' }, { 'label': '22:00', 'value': '22:00' }, { 'label': '23:00', 'value': '23:00' } ];
Version of Angular, UI-Select, and Bootstrap/Select2/Selectize CSS
Angular:1.5.3.
UI-Select:1.8.1
Bootstrap/Select2/Selectize CSS (if applicable):0.14.2 angular-ui-bootstrap bootrstrap:4.0.0