Angular autocomplete selected item change not triggering

865 Views Asked by At

I have a breakpoint set at the method that is supposed to execute when the md-selected-item-change flag is hit, but when I select an item, the breakpoint is never hit and the value that the method is supposed to populate is remaining null

<md-autocomplete  md-selected-item="createSnapDlgCtrl.selectedSg"
                          md-selected-item-change="createSnapDlgCtrl.getSnapShotListData(storageGroup)"
                          md-min-length="0"
                          md-items="storageGroup in createSnapDlgCtrl.allStorageGroups | filter:createSnapDlgCtrl.searchText1"
                          md-item-text="storageGroup.id"
                          md-search-text="createSnapDlgCtrl.searchText1"
                          ng-if="createSnapDlgCtrl.isSelectedStorageGroup == 'false'"
                          placeholder="Storage Group"
                          required>

            <md-item-template ngStyle="{'color':'black'}">
                <span md-highlight-text="createSnapDlgCtrl.searchText1" md-highlight-flags="^i">{{storageGroup.id}}</span>
            </md-item-template>

            <md-not-found>
                Storage group not found.
            </md-not-found>
        <!--name="storageGroupName" id="selectedStorageGroupName" ng-model="createSnapDlgCtrl.selectedSg" required>
               <md-option ng-repeat="StorageGroup in createSnapDlgCtrl.allStorageGroups" value="{{StorageGroup}}">{{StorageGroup.storageGroupName}}</md-option>-->
        </md-autocomplete>
0

There are 0 best solutions below