Topic: Is there a callback when selecting an item in mdb-completer dr
                                Hi,
I would like to know if there is any method I could call when I select an item in the suggested list.
A kind of onSelectedItemFromList property.
                                                                
                                
                                                                                                                                                    
                                        
                                
                            
                                                                                <mdb-completer [label]="'Search'" name="autocomplete" placeholder="search" [(ngModel)]="tag" [datasource]="tagList" [minSearchLength]="2" #item [onSelectedItemFromList="onAddTag(item.value)"></mdb-completer>Thanks a lot
                                                                                            Add comment
                                                                                    
                                                                    
                                                    
                                                    Maciej Szuchta
                                                                                        answered 8 years ago                                        
                                        Hello beachjf
You can use (selected) EventEmitter  of completer component like this:
 
                                                                                
                                        
                                        
                                    
                                                                                                        <mdb-completer [label]="'Search'" name="autocomplete" placeholder="search" [(ngModel)]="tag" [datasource]="tagList" [minSearchLength]="2" #item (selected) = "onAddTag($event)"></mdb-completer>$event passed to onAddTag function should contain information about selected value. Best Regards Maciej
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
                            
                            Answered
Specification of the issue
                                            
        - User: Pro
 - Premium support: No
 - Technology: MDB Angular
 - MDB Version: -
 - Device: -
 - Browser: -
 - OS: -
 - Provided sample code: No
 - Provided link: No