Currently facing an intriguing scenario that is causing me some confusion. This question is specifically for those well-versed in Angular UI Grid, but all responses are welcome.
The situation revolves around a UI Grid with a dropdown functionality implemented through a separate HTML page within the grid itself. The values of the dropdown dynamically change. I am using ng-model="row.entity.someValue"
as the model for this dropdown, which corresponds to $scope.someDate.someValue
obtained from the grid via field: 'someValue'
. The challenge I'm encountering is the inability to trigger a function call after selection without resorting to using ids and getElementById
calls. I have attempted using ng-selected
, ng-change
, and even thought about ng-class
(although realizing it wouldn't work). My objective is to execute a function with the selected value as a parameter, yet I can't seem to make the function fire. What am I overlooking here?
Below is a snippet resembling what I am striving to achieve:
<div>
<select ng-model="row.entity.someValue" class="dropdownWidth" ng-selected="someFunction(selectedValue)" >
<option ng-repeat="selectedValue in grid.appScope.someArray" value={{selectedValue}}>{{selectedValue}}</option>
</select>
</div>
UPDATE: Solution provided below.