n-form-field with n-input of type file #468
-
|
According to the vee-validate documentation, inputs of type file should be implemented differently as there's no bi-directional v-model, as you cannot set the value of a input with type file). I'm not sure how to implement this easily using the n-form-field and n-input from una-ui, as n-form-field automatically seem to bind v-model to n-input, and the n-form-field does not expose handleChange and handleBlur. For example, this does not appear to be possible: <n-form-field
name="assets.customCommonLayoutJson"
v-slot="{ handleChange, handleBlur }"
>
<n-input
type="file"
accept=".json"
@change="handleChange"
@blur="handleBlur"
/>
</n-form-field> |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Hello @Migushthe2nd, I did not notice your question here. I apologize for that. You mean https://www.unaui.com/components/form, right? |
Beta Was this translation helpful? Give feedback.
Besides, I am not sure why you will not use watch on the assets.customCommonLayoutJson field to trigger an update if there are changes.
also, It would be really helpful if you could create a reproduction.
You can use this one: https://stackblitz.com/github/una-ui/starter.