I am trying to use two way data binding using v-model on bootstrap-vue table. But the value on the table does not change when the value changes.
I try to change data with a input text.
<template>
<b-table striped hover :items="items" :fields="fields" v-model="items"></b-table>
<span>The Value: {{value}} </span>
<b-form-input v-model="value"></b-form-input>
</template>
<script>
export default {
data() {
return {
value = '',
fields: ['field', 'value',],
items: [
{ field: 'Field of Value', value: this.value},
]
}
}
}
</script>
given value from form input changes the span text but does not change b-table value?
valueproperty of the first object in theitemsarray is initialized withthis.value, but updatingthis.valuedoes not automatically update theitems[0].valuestring. - thibautg<b-form-input v-model="items[0].value"></b-form-input>- thibautg