v-autocomplete
v-autocomplete copied to clipboard
Remove value changes loop - emit event on item select and react on incoming value change
…oming value change
Hey @gorbunovav, could you add a bit of details regarding this PR, i.e. what it changes and why it's useful? I'm working around the same piece of functionality at the moment at would like to understand whether my thinking is correct.
Hi @killthekitten! The goal of this PR is to implement one-way data flow and avoid state duplication inside the component. On each change, the component emits an event and the parent updates own state, then the state change is propagated to the component via the bound property.
https://vuejs.org/v2/guide/components-props.html#One-Way-Data-Flow