Skip to content
Snippets Groups Projects
Verified Commit cc968063 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix(select): lookup after setSelection

parent 1a3f8416
Branches
Tags
No related merge requests found
...@@ -2282,6 +2282,7 @@ function isValueIsEmptyThenGetNormalize(value) { ...@@ -2282,6 +2282,7 @@ function isValueIsEmptyThenGetNormalize(value) {
* @returns {Promise<unknown | void>} * @returns {Promise<unknown | void>}
*/ */
function setSelection(selection) { function setSelection(selection) {
const self = this;
if (isString(selection) || isInteger(selection)) { if (isString(selection) || isInteger(selection)) {
const result = convertValueToSelection.call(this, selection); const result = convertValueToSelection.call(this, selection);
...@@ -2328,6 +2329,14 @@ function setSelection(selection) { ...@@ -2328,6 +2329,14 @@ function setSelection(selection) {
fireEvent(this, "change"); // https://gitlab.schukai.com/oss/libraries/javascript/monster/-/issues/291 fireEvent(this, "change"); // https://gitlab.schukai.com/oss/libraries/javascript/monster/-/issues/291
const lazyLoadFlag =
this.getOption("features.lazyLoad") && this[lazyLoadDoneSymbol] !== true;
let remoteFilterFlag = getFilterMode.call(this) === FILTER_MODE_REMOTE;
if (lazyLoadFlag || remoteFilterFlag) {
lookupSelection.call(self);
}
return new Processing(() => { return new Processing(() => {
const CLASSNAME = "selected"; const CLASSNAME = "selected";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment