Topic: autocomplete
diego pennisi pro asked 6 years ago
Arkadiusz Idzikowski staff answered 6 years ago
<div> <div> <mdb-completer [label]="'Seleccionar colores'" initialValue="Select color" name="autocomplete" [(ngModel)]="searchStr" [datasource]="dataService" [minSearchLength]="0"> </mdb-completer> </div> </div>Best, Arek
diego pennisi pro commented 6 years ago
does not work yet and now I change the label to <mdb-autocomplete [label]="'Select color'" initialValue="Select color" name="autocomplete" [(ngModel)]="searchStr" [datasource]="dataService" [minSearchLength]="0"> </mdb-autocomplete>Arkadiusz Idzikowski staff commented 6 years ago
Dear diego, Could you please describe in details what problems do you have with this component now? There are some problems with autocomplete when using both label and initialValue that we need to fix. Best, ArekArkadiusz Idzikowski staff answered 6 years ago
diego pennisi pro commented 6 years ago
Dear Arek , this is the code html: <div> <div><mdb-completer [label]="'Seleccionar colores'"initialValue="Select color"name="autocomplete" [(ngModel)]="searchStr" [datasource]="dataService" [minSearchLength]="0"></div> <div></mdb-completer></div> </div> --- this is the code ts import { CompleterData, CompleterService } from 'ng-uikit-pro-standard'; private searchStr: string; private dataService: CompleterData; private searchData = [ { color: 'red'}, { color: 'green'}, { color: 'blue'}, { color: 'cyan'}, { color: 'magenta'}, { color: 'azul'}, { color: 'negro'}, ]; constructor(private completerService: CompleterService) { this.dataService = completerService.local(this.searchData, 'color', 'color'); console.log(this.searchData); } thank... for you commentFREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No