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

ui-disable-choice not working #1983

Open
@geoffreyvd

Description

@geoffreyvd

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

Activity

Jefiozie

Jefiozie commented on Apr 26, 2017

@Jefiozie
Contributor

hi,

Had a look at the issue you are describing. Look like this should, work but is the version of ui-select a typo?
There isn't any 1.8.1 version released. To help you further I need to see a plunker where the problem is.

xycloud

xycloud commented on Jun 16, 2017

@xycloud

ui-disable-choice also not working in version: '0.16.0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @geoffreyvd@Jefiozie@xycloud

        Issue actions

          ui-disable-choice not working · Issue #1983 · angular-ui/ui-select