@skirbi/sugar 0.0.21 → 0.0.22
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/Changes +4 -0
- package/lib/htmlelement-select.mjs +12 -1
- package/lib/index.mjs +1 -1
- package/package.json +1 -1
package/Changes
CHANGED
|
@@ -115,9 +115,20 @@ export class HTMLElementSugarSelect extends HTMLElementSugarInput {
|
|
|
115
115
|
if (hasStatic) {
|
|
116
116
|
this._setOptionsFromOptions(select, rawOptions, cfg);
|
|
117
117
|
if (searchEl) this._setupLocalSearch(select, searchEl);
|
|
118
|
-
}
|
|
118
|
+
}
|
|
119
|
+
else if (hasEndpoint) {
|
|
119
120
|
this._setupRemote(select, searchEl, cfg);
|
|
120
121
|
}
|
|
122
|
+
else {
|
|
123
|
+
const authoredOptions = Array.from(this.children)
|
|
124
|
+
.filter((node) => node.matches?.('option,optgroup'));
|
|
125
|
+
|
|
126
|
+
for (const option of authoredOptions) {
|
|
127
|
+
select.appendChild(option);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
121
132
|
|
|
122
133
|
// Apply initial value after options exist.
|
|
123
134
|
if (cfg.value != null && cfg.value !== '') select.value = String(cfg.value);
|
package/lib/index.mjs
CHANGED
package/package.json
CHANGED