[Vuejs]-Vue.js โ€“ 2 way binding not working. Data is not updating when changed in a component

0๐Ÿ‘

โœ…

try this

<builder :formula.sync="formula"
    :columns="columns"
    :result_type="result_type">
</builder>

0๐Ÿ‘

As in VueJS 2 .sync โ€“ 2 way binding has been deprecated, you have to handle it differently. https://v2.vuejs.org/v2/guide/migration.html#once-and-sync-Modifiers-on-v-bind-removed

You have to emit events like this.$emit('formulaChange', formula) etc. and listen to them in parent component with @formulaChange=yourHandler(formula)

Leave a comment