@@ -17,6 +17,7 @@ import { IconMagnifierComponent } from '../icons/icon-magnifier/icon-magnifier.c
1717import { debounceTime , noop , Subject } from 'rxjs' ;
1818import { NgClass } from '@angular/common' ;
1919import { FocusOnKeyUtil } from '../utils/focus-on-key.util' ;
20+ import { AutoFocusDirective } from '../auto-focus.directive' ;
2021
2122export const SEARCH_CONTROL_VALUE_ACCESSOR = {
2223 provide : NG_VALUE_ACCESSOR ,
@@ -27,7 +28,7 @@ export const SEARCH_CONTROL_VALUE_ACCESSOR = {
2728@Component ( {
2829 selector : 'ff-search' ,
2930 standalone : true ,
30- imports : [ FormsModule , NgClass , IconMagnifierComponent ] ,
31+ imports : [ FormsModule , NgClass , IconMagnifierComponent , AutoFocusDirective ] ,
3132 templateUrl : './search.component.html' ,
3233 styleUrl : './search.component.scss' ,
3334 changeDetection : ChangeDetectionStrategy . OnPush ,
@@ -36,6 +37,7 @@ export const SEARCH_CONTROL_VALUE_ACCESSOR = {
3637export class SearchComponent implements OnInit , AfterViewInit , OnDestroy , ControlValueAccessor {
3738 @Input ( ) placeholder : string = 'Search...' ;
3839 @Input ( ) focusKey : string = '/' ;
40+ @Input ( { transform : booleanAttribute } ) autofocus : boolean = false ;
3941 @Input ( { transform : booleanAttribute } ) forceFocus : boolean = false ;
4042 @Input ( { transform : booleanAttribute } ) focusKeyEnabled : boolean = true ;
4143 @Input ( { transform : booleanAttribute } ) slim : boolean = false ;
0 commit comments