@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 CHANGED
@@ -1,5 +1,9 @@
1
1
  Revision history for @skirbi/sugar
2
2
 
3
+ 0.0.22 2026-05-28 03:45:56Z
4
+
5
+ * Fix htmlelementsugar-select for using native options
6
+
3
7
  0.0.21 2026-05-10 02:05:46Z
4
8
 
5
9
  * Add `$()` and `$$()` selector helpers to HTMLElementSugar.
@@ -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
- } else if (hasEndpoint) {
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
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SPDX-License-Identifier: MIT
4
4
 
5
- const VERSION = "0.0.21";
5
+ const VERSION = "0.0.22";
6
6
 
7
7
  export { HTMLElementSugar } from './htmlelement.mjs';
8
8
  export { HTMLElementSugarInput } from './htmlelement-input.mjs';
package/package.json CHANGED
@@ -52,5 +52,5 @@
52
52
  },
53
53
  "sideEffects": false,
54
54
  "type": "module",
55
- "version": "0.0.21"
55
+ "version": "0.0.22"
56
56
  }