@innertia-solutions/innertia-nuxt 0.1.75 → 0.1.76

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.
@@ -79,6 +79,26 @@ onMounted(() => {
79
79
  initHsSelect()
80
80
  })
81
81
 
82
+ /**
83
+ * Si las options llegan o cambian después del mount (query async), HSSelect ya
84
+ * construyó su dropdown con las viejas (vacío) y no se entera. Se destruye y se
85
+ * vuelve a inicializar con las nuevas, conservando el valor seleccionado.
86
+ */
87
+ watch(
88
+ () => (props.options ?? []).map((o: any) => `${o.value}::${o.label}::${o.disabled ? 1 : 0}`).join('|'),
89
+ async () => {
90
+ const el = selectRef.value
91
+ const HSSelect = (window as any).HSSelect
92
+ if (!el || !HSSelect) return
93
+ try {
94
+ HSSelect.getInstance?.(el)?.destroy?.()
95
+ } catch (e) {
96
+ console.warn('[FormsSelect] HSSelect destroy falló:', e)
97
+ }
98
+ await initHsSelect()
99
+ },
100
+ )
101
+
82
102
  const handleChange = (e: Event) => {
83
103
  const val = (e.target as HTMLSelectElement).value
84
104
  emit('update:modelValue', val || null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innertia-solutions/innertia-nuxt",
3
- "version": "0.1.75",
3
+ "version": "0.1.76",
4
4
  "description": "Innertia Solutions — Nuxt layer unificada: core, auth, multitenancy, theme y app contexts",
5
5
  "keywords": [
6
6
  "nuxt",