-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error refresh method .Elements doubles after that - bootsrap 5 + vue 2 #2712
Comments
Yes i have faced this issue , fix for that is Add line at 1780 @ render: funcation Fixed |
@jayb611 Do you know where I can get the fix? Or is it necessary to install some less or sass code in order to build my own? |
I have already mentioned above where you need to place and replace code to fix this issue, no you do not need SASS code |
Not sure what all has changed since @jayb611 posted their comment, but the only consistent fix I've found so far is slightly modifying the In the compiled source, that seems to be line 1657. From the "raw" source, it's line 1633. Find this switch: switch (type) {
case 'data': {
if (!this.selectpicker.main.data) {
this.selectpicker.main.data = [];
}
Array.prototype.push.apply(this.selectpicker.main.data, mainData);
this.selectpicker.current.data = this.selectpicker.main.data;
break;
}
case 'search': {
Array.prototype.push.apply(this.selectpicker.search.data, mainData);
break;
}
} and comment out or remove the check for switch (type) {
case 'data': {
this.selectpicker.main.data = [];
Array.prototype.push.apply(this.selectpicker.main.data, mainData);
this.selectpicker.current.data = this.selectpicker.main.data;
break;
}
case 'search': {
Array.prototype.push.apply(this.selectpicker.search.data, mainData);
break;
}
} I have no idea what the performance implications of this will be, but it seems like resetting the |
I use bootsrap 5 + vue 2 .
code html
after vue rendering html i use method
$('#sb_select1').selectpicker('refresh');
after refreshing items have a doubles, vue get correnct items, but selectpicker('refresh') method not work correctly
The text was updated successfully, but these errors were encountered: