mnfst 0.5.183 → 0.5.184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/manifest.combobox.js
CHANGED
|
@@ -236,6 +236,20 @@ function initializeComboboxPlugin() {
|
|
|
236
236
|
// ----- Source / options -----
|
|
237
237
|
const sourceId = cfg.source ? String(cfg.source).replace(/^#/, '') : null;
|
|
238
238
|
const src = sourceId ? document.getElementById(sourceId) : null;
|
|
239
|
+
|
|
240
|
+
// A named source that isn't in the DOM yet (it renders after us — a later sibling,
|
|
241
|
+
// an x-if branch, an async component) would otherwise leave the field menu-less and
|
|
242
|
+
// unable to resolve labels forever. Nothing is mutated before this point, so wait
|
|
243
|
+
// for it and cleanly re-enter build(); give up after ~5s → a source-less field.
|
|
244
|
+
if (sourceId && !src && !isAsync) {
|
|
245
|
+
if ((el.__cbSourceTries = (el.__cbSourceTries || 0) + 1) <= 100) {
|
|
246
|
+
el.__mnfstCombobox = false;
|
|
247
|
+
setTimeout(() => build(el, modifiers, expression, cleanup), 50);
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
// fell through: never appeared — proceed as a source-less (free-entry) field
|
|
251
|
+
}
|
|
252
|
+
|
|
239
253
|
let options = readOptions(src);
|
|
240
254
|
const hasMenu = !!src || isAsync;
|
|
241
255
|
if (editorNone && !hasMenu) return; // a button trigger needs a list
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"manifest.code.js": "sha384-G3MNfvQRWWY+gm4SGGrSsgQbDeil9MP+ON2DTk6Rcq9Nsex8woHMDt5EJHrFH0Nj",
|
|
8
8
|
"manifest.color.js": "sha384-6Rv3LxyTcZNjrhtayQfqRdCx0uSZ4BiEbgEI98I62eTvp8Aw7LBIoNJ0Je1oktwL",
|
|
9
9
|
"manifest.colorpicker.js": "sha384-N5ezEwgKrDodV4YdURxhdyZKmg1n/QhqvmAC4SEG03mw1pEAZAA8Gphp+NLAOxts",
|
|
10
|
-
"manifest.combobox.js": "sha384-
|
|
10
|
+
"manifest.combobox.js": "sha384-KMD5B1g0cbfmEK99ML/ejizkEY3zGoydE/VeWIqq5G9/V0y2YSzuedKfWlBMmv/O",
|
|
11
11
|
"manifest.components.js": "sha384-eZDib+RFdwd9mOUdi6o53eNS0LBlEEkZPDegxtkAcE+GrGIFxsuB4O0ymfixGNfM",
|
|
12
12
|
"manifest.data.js": "sha384-3lLvGnqcQr4Ium80MdaQTr8RytjVbs5rnxd0q41BF3ppcoQccMFAcvgFSyZP/0sl",
|
|
13
13
|
"manifest.datepicker.js": "sha384-52BBZdlLN+EATiUorwTEQOWGJZiSNu0voy9q+WQxxWpUeYsGGkuS0QPPXGx2akxG",
|