diff --git a/source/components/form/button.mjs b/source/components/form/button.mjs index 69a3052a7c4e6e9b29e503a558142ad859166181..a7c78a13b16e669456ffb47cb5a741b3b80478cf 100644 --- a/source/components/form/button.mjs +++ b/source/components/form/button.mjs @@ -314,7 +314,7 @@ function getTemplate() { <button data-monster-attributes="disabled path:disabled | if:true, class path:classes.button, aria-role path:aria.role, - path:aria.label | if:true, + path:aria.label | if:true, type path:type" data-monster-role="button" part="button" diff --git a/source/components/form/select.mjs b/source/components/form/select.mjs index 657a3821d38361a88970d97aa0b2fc161f1a3341..5ecf9cff216daee2312570535ba34725c5eb0c23 100644 --- a/source/components/form/select.mjs +++ b/source/components/form/select.mjs @@ -2282,6 +2282,7 @@ function isValueIsEmptyThenGetNormalize(value) { * @returns {Promise<unknown | void>} */ function setSelection(selection) { + const self = this; if (isString(selection) || isInteger(selection)) { const result = convertValueToSelection.call(this, selection); @@ -2328,6 +2329,14 @@ function setSelection(selection) { 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(() => { const CLASSNAME = "selected";