Maybe this sounds like a repeated question, but I've tried some solutions from other users but in my case nothing works.
I currently have a dropdown that displays a list of departments. I'm trying with the button to reset (clear dropdown), the dropdown has no option selected and only show the default option when nothing has been selected. this function when activated, generates this blank space. what am I doing wrong?
Thank you
<select ng-model="select_deptos" ng-options="item as item.NOMBRE_DPT for item in aDepartamentos track by item.DPTO" ng-change="fn_setSemestreFiltro('departamento')">
<option value='' style="display:none;">Select</option>
</select>
<button ng-click="clear()">clear dropdown</button>
$http({
method: 'GET',
url: 'depto.json'
}).then(function successCallback(response) {
$scope.aDepartamentos=response.data;
})
$scope.clear=function(){
$scope.select_deptos="";
}