janiskelemen / formvuelar

Vue form components with server-side validation in mind

Home Page:https://janiskelemen.github.io/formvuelar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FvlSelect.vue

Barrykilby opened this issue · comments

Hi Janis,

I was having issues with the select box updating my value or even rendering with the supplied value, after a little bit of digging it seems that FvlSelect is missing the value prop and line 16 should read:

@change="$emit('update:value', $event.target.value); $parent.dirty(name);"

To correctly emit the value/event?

Barry

Hi Barry, I’m currently on vacation but I will take a look at it next week. You can also submit a pull request if you already have a fix. 😊

Sent with GitHawk

hi,

I just looked into this and it seems that you are trying to set the value through the value instead of the key. Make sure that you use the key instead of the value to preselect or update the select field. If you don't have a key you can just use the same as the value like {'myvalue': 'myvalue'}

Janis