Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/polite-dragons-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect-app/vue-components": patch
---

refactor: remove unused fieldKey computed property from OmegaInput component
5 changes: 5 additions & 0 deletions .changeset/stale-showers-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect-app/vue-components": patch
---

fix: ensure nextTick is used for state change handling in OmegaTaggedUnionInternal
13 changes: 0 additions & 13 deletions packages/vue-components/src/components/OmegaForm/OmegaInput.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<component
:is="form.Field"
:key="fieldKey"
:name="name"
:validators="{
onChange: schema,
Expand Down Expand Up @@ -84,18 +83,6 @@ const meta = computed(() => {
return formMeta
})

// Key to force Field re-mount when meta type changes (for TaggedUnion support)
const fieldKey = computed(() => {
const m = meta.value
if (!m) return propsName.value
// Include type and key constraints in the key so Field re-mounts when validation rules change
// Cast to any since not all FieldMeta variants have these properties
const fm = m as any
return `${propsName.value}-${fm.type}-${fm.minLength ?? ""}-${fm.maxLength ?? ""}-${fm.minimum ?? ""}-${
fm.maximum ?? ""
}`
})

// Call useIntl during setup to avoid issues when computed re-evaluates
const { trans } = useIntl()

Expand Down