How allow for dynamic :options property in v-for where i 'render' dynamic formkit fields #1361
fdverwoerd
started this conversation in
General
Replies: 1 comment
-
One way would be to have an if statment for different kinds, for its not only Other way would be to construct the bind for everything, so the bind would also return the type inside of it, so ts can deduce on the object you return that its a specific type with specific fields. function bindFreeFields(field) {
return field;
}
<FormKit
v-for="freeField in config.extraRequestFields"
v-bind="bindFreeFields(freeField)"
/> |
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
-
So I have this loop, and now I was trying to add 'select' as possible type. But select needs
:options
but text doesnt. How is the best way to go about:my getfree looks like this:
I tried v-bind and :options but I get Squiqly linees on Formkit because of type:
Even though the code works, I want to know how to make this safe (type safe or not get squiqly lines).
Beta Was this translation helpful? Give feedback.
All reactions