Select list should retain selected position when re-rendered
This commit is contained in:
parent
d1ad811594
commit
76f3855c87
@ -127,7 +127,7 @@ export default class uSelect {
|
||||
* @param {string=} selected
|
||||
*/
|
||||
setOptions(options, selected) {
|
||||
selected = selected || '';
|
||||
selected = selected || this.element.value;
|
||||
this.element.options.length = 0;
|
||||
if (this.hasHead) {
|
||||
this.addHead();
|
||||
|
Loading…
x
Reference in New Issue
Block a user