Skip to content

Commit 9e85554

Browse files
authored
Update in-memory value on dropdown refresh. Fixes #2047 (#2058)
1 parent b814cdc commit 9e85554

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/common/viz/ConfigDialogEntries/CustomConfigEntries.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ define([
183183
stringEntry.valueItems = stringEntry.valueItems || [];
184184
}
185185

186-
const widget = await this.getEntryForProperty(stringEntry);
186+
const entry = await this.getEntryForProperty(stringEntry);
187187
if (configEntry.valueItemsURL) {
188-
const $dropdown = widget.el.find('select');
188+
const $dropdown = entry.el.find('select');
189189
const updateDropdown = async () => {
190190
const valueItems = await this._fetchValueItems(configEntry);
191191
$dropdown.empty();
@@ -202,13 +202,14 @@ define([
202202
opt.innerText = '';
203203
dropdown.appendChild(opt);
204204
}
205-
this._addExtraValueItems(widget, configEntry);
205+
this._addExtraValueItems(entry, configEntry);
206206
}
207+
entry.widget.setValue(dropdown.value);
207208
};
208209
$dropdown.on('focus', _.throttle(updateDropdown, 1000));
209210
}
210211

211-
return widget;
212+
return entry;
212213
}
213214

214215
async _fetchValueItems(configEntry) {

0 commit comments

Comments
 (0)