From 76f3855c87d85354d7e46623b8c69be21459561a Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Sat, 28 Dec 2019 20:34:50 +0100 Subject: [PATCH] Select list should retain selected position when re-rendered --- js/src/select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/select.js b/js/src/select.js index 723b0e4..9bc9feb 100644 --- a/js/src/select.js +++ b/js/src/select.js @@ -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();