You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I found a simple solution to this problem. $('#country').selectpicker('destroy');
this code solves the problem.
Maybe you need to make similar changes as well.
$('#country').empty(); $('#country').html('<option value="-1" selected = "selected">- Please Country Select-</option>');
$("#country").val(-1);
$.ajax({ .........
In this way scroll to top
Demo:
https://plnkr.co/edit/k2xl65uBG8xsFVaX
Steps to reproduce:
Environment:
Boostrap 4
Boostrap-select 1.13.17
jQuery version 3.4.1
Windows 10
Chrome 83.0.4103.97
Code that seems buggy:
bootstrap-select.js
line: 2876-2881:
This code selects the first highlightable index. In this case index = 1
Further down in the scroll to top code:
line: 2901-2911:
Only scrolls to top if index === 0. Since index 0 is not highlightable. This has to check for the first highlightable index and not 0.
BR,
Lucas
The text was updated successfully, but these errors were encountered: