Closed Sauravsam85 closed 5 years ago
@alexandru-paduraru @timcreative @chelaruc. Please look into this. Thanks.
i have same issue
@Sauravsam85 @huadeang thank you for using our product and sorry for the late response. What version do you have? Best, Ciprian
Here works fine. Version v1.0.1 Only I need to do is put the class="selectpicker". Nothing on TS.
<div class="col-md-4">
<label for="cliente">Cliente <span class="star">*</span></label>
<select class="selectpicker"
data-style="btn btn-block"
[(ngModel)]="saida.cliente.codigo"
name="codigo"
[disabled]="saida.codigo != null">
<option *ngFor="let cliente of clientes.reverse()" [value]="cliente.codigo">
{{ cliente.nome }}
</option>
</select>
</div>
Problem still persists. Without class="selectpicker"
works just fine, but when you add that class it displays empty list.
Please provide script on how you load it from http request.
The single select does not work with the angular cycles. The data just doesn't appear in the options when I try and use a web service to populate the selectpicker list. I want that to work with the NGFor because I receive information by the web service.
I have tried with local arrays and it works for me, but not with web services.
If I inspect the control I can see it has the correct data, example:
But the dropdown shows Nothing selected and on clicking the dropdown works but the list is not shown.
I have tried adding the below to ngAfterViewInit(): if ($(".selectpicker").length != 0) { $(".selectpicker").selectpicker({ iconBase: "ti", tickIcon: "ti-check" }); } But it still does not help.
My array is defined as follows: public socialcodes: Array = [];
Data comes in this array as shown below: 0:{SocialCode: 1, SocialDesc: "1 - ABC"} 1:{SocialCode: 3, SocialDesc: "3 - XYZ"} 2:{SocialCode: 4, SocialDesc: "4 - DEF"}