Commit c8327d7 Tom
committed
1 parent 964942d commit c8327d7 Copy full SHA for c8327d7
File tree 3 files changed +4
-3
lines changed
ng-mat-search-bar/mat-search-bar
3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ <h1>Test Page</h1>
6
6
7
7
< h1 > Reactive form Test Page</ h1 >
8
8
< div style ="position: absolute; top: 60%; left: 50%; height: 50px; width: 50%; ">
9
- < mat-search-bar [formControl] ="control "> </ mat-search-bar >
9
+ < mat-search-bar [formControl] ="control " [placeholder] =" 'custom placeholder' " > </ mat-search-bar >
10
10
< p > {{ control.value }}</ p >
11
11
</ div >
Original file line number Diff line number Diff line change 1
1
< mat-form-field *ngIf ="!formControl " class ="mat-search_field " [@slideInOut] ="searchVisible ">
2
- < input #input matInput type ="text " placeholder =" " [(ngModel)] ="value " (ngModelChange) ="updateChanges() "
2
+ < input #input matInput type ="text " [ placeholder] =" placeholder " [(ngModel)] ="value " (ngModelChange) ="updateChanges() "
3
3
(blur) ="onBlurring(input.value) " (keyup.enter) ="onEnterring(input.value) " (focus) ="onFocussing(input.value) " />
4
4
</ mat-form-field >
5
5
6
6
<!-- FORM CONTROL WAY -->
7
7
< mat-form-field *ngIf ="formControl " class ="mat-search_field " [@slideInOut] ="searchVisible ">
8
- < input #input matInput type ="text " placeholder =" " [formControl] ="formControl " (blur) ="onBlurring(input.value) "
8
+ < input #input matInput type ="text " [ placeholder] =" placeholder " [formControl] ="formControl " (blur) ="onBlurring(input.value) "
9
9
(keyup.enter) ="onEnterring(input.value) " (focus) ="onFocussing(input.value) " />
10
10
</ mat-form-field >
11
11
Original file line number Diff line number Diff line change 45
45
@ViewChild ( 'input' , { static : false } ) inputElement : ElementRef ;
46
46
47
47
@Input ( ) formControl : FormControl ;
48
+ @Input ( ) placeholder = '' ;
48
49
49
50
@Output ( ) onBlur = new EventEmitter < string > ( ) ;
50
51
@Output ( ) onClose = new EventEmitter < void > ( ) ;
You can’t perform that action at this time.
0 commit comments