Skip to content
This repository was archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
Merge pull request #19 from ploutarchos/input_placeholder
Browse files Browse the repository at this point in the history
Ability to provide a configurable value as a placeholder
  • Loading branch information
shochdoerfer authored May 23, 2017
2 parents 8efba7a + 3c388f7 commit 87d0c05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ delay before triggering search.
`inputClass: string = 'form-control';`
class to apply to the inner input field

`inputPlaceholder: string = '';`
value of the placeholder attribute of the inner input field

`loadingIconClass: string = 'loader';`
class to apply to the loading icon element

Expand Down
4 changes: 3 additions & 1 deletion src/combo-box.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';
selector: 'combo-box',
template: `
<div class="field-wrap">
<input #inputField class="{{inputClass}}" type="text"
<input #inputField class="{{inputClass}}" type="text" placeholder="{{inputPlaceholder}}"
[(ngModel)]="currVal"
(keydown)="onKeyDown($event)"
(blur)="onFieldBlur($event)"
Expand Down Expand Up @@ -131,6 +131,8 @@ export class ComboBoxComponent implements ControlValueAccessor, OnInit {
@Input()
inputClass: string = 'form-control';
@Input()
inputPlaceholder: string = '';
@Input()
loadingIconClass: string = 'loader';
@Input()
triggerIconClass: string = 'trigger';
Expand Down

0 comments on commit 87d0c05

Please sign in to comment.