Skip to content

Commit

Permalink
show placeholders also for empty values
Browse files Browse the repository at this point in the history
  • Loading branch information
hutzelknecht committed Oct 6, 2015
1 parent 8a163b8 commit 86a6c5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/directives/select-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ module formFor {
// Once a value has been selected, clear the placeholder prompt.
if ($scope.model.bindable) {
$scope.emptyOption[$scope.labelAttribute] = '';
} else if ($scope.model.bindable === undefined) {
$scope.emptyOption[$scope.labelAttribute] = $scope.placeholder;
}
};

Expand Down Expand Up @@ -412,4 +414,4 @@ module formFor {
($document, $log, $timeout, FieldHelper, FormForConfiguration) => {
return new SelectFieldDirective($document, $log, $timeout, FieldHelper, FormForConfiguration);
});
}
}

0 comments on commit 86a6c5d

Please sign in to comment.