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/cyan-clubs-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect-app/vue-components": patch
---

Fixes name for state update
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type Leaves<T, Path extends string = ""> = T extends ReadonlyArray<infer
: Leaves<T[K], `${Path extends "" ? "" : `${Path}.`}${K & string}`> & {}
}[keyof T]

export type BaseProps<From> = {
export type BaseProps<From, TName extends NestedKeyOf<From> = NestedKeyOf<From>> = {
/**
* Will fallback to i18n when not specified.
* Can also be provided via #label slot for custom HTML labels.
Expand All @@ -24,7 +24,7 @@ export type BaseProps<From> = {
label?: string
validators?: FieldValidators<From>
// Use FlexibleArrayPath: if name contains [], just use TName; otherwise intersect with Leaves<From>
name: Leaves<From>
name: TName & Leaves<From>
/**
* Optional class to apply to the input element.
* - If a string is provided, it will be used instead of the general class
Expand Down