javascript - AngularJS 1.x dependent dropdowns: third level not getting reset when changing first level -
i have three-level dependent dropdown built using angularjs, shown in this fiddle , in following code.
<select ng-model="clock" ng-options="clock clock.clockname clock in dropdowns"></select> <select ng-model="freq" ng-options="freq freq.freq freq in clock.freqs" ng-disabled="!clock"></select> <select ng-model="rate" ng-options="rate rate rate in freq.rates" ng-disabled="!clock || !freq"></select>
the problem when change top level dropdown, doesn't reset third level dropdown. replicate it, try selecting 1 value each in first second , third dropdowns. change first dropdown, can see second dropdown reset, third not.
any suggestions?
you've discovered old bug: model wasn't updated if selected option removed.
this odd behaviour has been corrected this commit, in angularjs 1.4.0-beta.0. can update version of framework solve problem.
Comments
Post a Comment