lundi 2 mai 2016

Why does turning ng-model to false not unchecking the md-checkbox

Few days back, I posted a question regarding having a md-select control with a select-All option. Based on the answer I manually inserted a md-checkbox above md-options and tried to control the selections.

This worked for me, however I am facing a glitch where in I am unable to uncheck the md-checkbox if any of the other options are checked. Below is my code:

<md-input-container class="flex pm_serch_box_overflow"  >
                        <label class="pm_search_label">Cluster</label>
                        <md-select id="clusterSearchId" multiple  aria-label="searchCluster" >
                            <md-checkbox ng-value="" ng-model="clusterSelectAll" ng-click="manageDropDownSelection('selectedClusters','clusters')">(Select All)</md-checkbox>
                            <md-option ng-value="t" ng-click="clusterSelectAll = false" ng-repeat="t in array| orderBy:'code' track by $index"></md-option>
                        </md-select>
                    </md-input-container>

I have tried turning it false from controller as well, the variable are turning false as I have debugged them. Somehow the effect is not promoted to UI and checkbox remains checked.

Is there a different approach to uncheck a md-checkbox??




Aucun commentaire:

Enregistrer un commentaire