You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a material select which binds the data using angular, on page load I disabled the Material select, on button click am enabling the material select.
Issue : Material Select is not enabled
<bodyng-app="materializeApp" ng-controller="BodyController"><main><divclass="row container"><divclass="col s12 m12 l12"><divclass="card blue-grey darken-1"><divclass="card-content white-text"><spanclass="card-title">Update Form</span><divclass="row"><formclass="col s12"><divclass="row"><divclass="input-field col s6"><inputid="icon_prefix" type="text" class="validate" ng-model="data.firstname"><labelfor="icon_prefix">First Name</label></div><divclass="input-field col s6"><inputid="icon_telephone" type="text" class="validate" ng-model="data.lastname"><labelfor="icon_telephone">Last Name</label></div><divclass="input-field col s8"><inputid="email" type="email" class="validate" ng-model="data.email"><labelfor="email" data-error="Wrong" data-success="Right">Email</label></div><divclass="section col s4"><divinput-field><selectng-model="projects.value" material-selectng-disabled="checked"><optionng-repeat="value in projects.choices">{{value}}</option></select></div></div></div></form></div></div><divclass="card-action white-text right-align"><aclass="waves-effect waves-light btn" ng-click="edit()"><iclass="material-icons right">cloud</i>Edit</a></div></div></div></div></main><script>varapp=angular.module('materializeApp',['ui.materialize'.controller('BodyController',["$scope",function($scope){$scope.projects={value: "Select Value",choices: ["p1","p2","p3","p4"]};debugger;$scope.checked=true;$scope.edit=function(){$scope.checked=false;}}]);</script>
The text was updated successfully, but these errors were encountered:
The material-select directive doesn't not watch the ng-disabled attribute. It is therefore never notified that the disabled status has changed.
For now, i would suggest having 2 selects, one that is always disabled, and one that is always enabled. Then show one of the two depending on the value of checked.
I'll mark this as an enhancement, since you want the material-select´ directive to watch for changes in ng-disabled`. This should be somewhat straight-forward, so pull-requests are welcome.
I have a material select which binds the data using angular, on page load I disabled the Material select, on button click am enabling the material select.
Issue : Material Select is not enabled
The text was updated successfully, but these errors were encountered: