Replies: 1 comment
-
I'm having the same issue, can't figure out how to actually use the augmented Props in combination with defineProps in a custom component. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It's currently very hard to properly type
context
prop in custom vue input.I think that it should be easier to "grab" all component specific props and builtin context features.
I tried to use augmented
FormKitInputProps
type to use when I define my custom input props with no success.My augmentation:
My props definition inside custom input:
The above doesn't work because
FormKitInputProps
expects a generic. I tried to add required generic with the help from Justin Shroeder (in discord channel) like thatcontext: FormKitFrameworkContext & FormKitInputProps<{ type: 'vselect'; list: any[] }>
but this didn't help and my custom props were still infered asunknown
.Thank you for considering my proposal
Beta Was this translation helpful? Give feedback.
All reactions