Skip to content

Fix complex field types: input[type="checkbox"] and select[multiple] #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kaidjohnson
Copy link

@kaidjohnson kaidjohnson commented Jul 9, 2019

input[type="checkbox"] can represent boolean, string, and string[] data. select[multiple] expects an array, but event.target.value only represents a single string value.

Vue has resolved this logic within v-model (https://vuejs.org/v2/guide/forms.html#Checkbox, https://vuejs.org/v2/guide/forms.html#Checkbox-1). This update adds a change event listener to handle these more complex use-cases, allowing access to the value bound via v-model and updating the final-form state accordingly.

Addresses #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant