matfish2 / vue-formular

a comprehensive vue.js form component
https://www.npmjs.com/package/vue-formular
MIT License
43 stars 11 forks source link

additionalPayload doesn't respect change #9

Closed purepear closed 8 years ago

purepear commented 8 years ago

I didn't find how to add type="hidden" fields so i used additionalPayload but it seems it doesn't respect the change. Submits the initial value options: {additionalPayload: {additional: 'initial value' }}

If i change it in a method this.options.additionalPayload.additional = 'asdsasds' it submits 'inital value' Also tried with this.$set('options.additionalPayload', {additional: 'asdasdasd'}

purepear commented 8 years ago

I managed to change it using this.$refs.form.options.additionalPayload.additional = 'adasdasd'. Is this how it's supposed to work ?

matfish2 commented 8 years ago

Yes. You need to get the component instance, not the root one.