Closed criti18 closed 6 years ago
Hi, @criti18! Thank you for using our product! Can you init bootstrap select picker in AfterViewInit? Like:
ngAfterViewInit(){
// Init Bootstrap Select Picker
if($(".selectpicker").length != 0){
$(".selectpicker").selectpicker({
iconBase: "ti",
tickIcon: "ti-check"
});
}
}
And don't forget to import AfterViewInit. Tell me if it worked.
All the best, Ciprian
I tried, but I have the same result the select disappears with any ngIf, any ideas?
@criti18 I've made some tests and I'm thinking this is a solution: For .ts:
For .html:
And delete:
// Init Bootstrap Select Picker
if($(".selectpicker").length != 0){
$(".selectpicker").selectpicker({
iconBase: "ti",
tickIcon: "ti-check"
});
}
Tell me if it worked!
Best, Ciprian
Did this ever work for web services?
@Sauravsam85 we are not working with web services, that's why I can't tell you for sure if it's working. Best, Ciprian
The single select and the multiple select don't work with the angular cycles. The data just doesn't appear in the options, I have tried with local arrays and I get the same result. It's important that this works with the NGFor because I receive information by the webservices.