Variable SmartSuggestConst
Smart Suggest : __VLS_WithTemplateSlots < DefineComponent < __VLS_TypePropsToRuntimeProps < { triggers : Trigger [] ; } > , {} , unknown , {} , {} , ComponentOptionsMixin , ComponentOptionsMixin , { select : ( ( item ) => void ) ; open : ( ( ) => void ) ; close : ( ( ) => void ) ; } , string , VNodeProps & AllowedComponentProps & ComponentCustomProps , Readonly < ExtractPropTypes < __VLS_TypePropsToRuntimeProps < { triggers : Trigger [] ; } > > > & { onSelect ?: ( ( item ) => any ) ; onClose ?: ( ( ) => any ) ; onOpen ?: ( ( ) => any ) ; } , {} , {} > , { default ? ( _ ) : any ; dropdown ? ( _ ) : any ; item ? ( _ ) : any ; no-result ? ( _ ) : any ; } > Type declaration default ?: functiondefault ( _ ) : any Returns any Defined in lib/index.d.ts:151 dropdown ?: functiondropdown ( _ ) : any Parameters _ : { position : { toTop : boolean ; top : number ; left : number ; width : number ; height : number ; } ; items : { value : string ; searchMatch ?: string ; label ?: string ; image ?: string ; [x : string ]: unknown ; } [] ; activeIndex : number ; trigger : Trigger ; select : ( ( item ) => void ) ; } position : { toTop : boolean ; top : number ; left : number ; width : number ; height : number ; } to Top : boolean top : number left : number width : number height : number items : { value : string ; searchMatch ?: string ; label ?: string ; image ?: string ; [x : string ]: unknown ; } [] active Index : number select : ( ( item ) => void ) Returns any Defined in lib/index.d.ts:152 item ?: functionitem ( _ ) : any Parameters _ : { item : { value : string ; searchMatch ?: string ; label ?: string ; image ?: string ; [x : string ]: unknown ; } ; active : boolean ; trigger : Trigger ; select : ( ( item ) => void ) ; } item : { value : string ; searchMatch ?: string ; label ?: string ; image ?: string ; [x : string ]: unknown ; } [ x : string ]: unknown value : string Optional
search Match ?: string Optional
label ?: string Optional
image ?: string active : boolean select : ( ( item ) => void ) Returns any Defined in lib/index.d.ts:171 no- result ?: functionno- result ( _ ) : any Returns any Defined in lib/index.d.ts:183 Defined in lib/index.d.ts:132
Component responsible for handling the input and displaying the dropdown. Accepts a list of triggers which are used to determine when to open the dropdown. It should have a single child element which is the input element (@see AcceptedInputType for supported types).
Based on your need, you can customize the dropdown items (SmartSuggestItem) or the full dropdown (slot="dropdown").
When using showNoResult=true, you can also customize the no result message (slot="no-result").