Open AndreiSoroka opened 1 year ago
Hi
<script setup> const list = ref([1,2,3]) </script> <template> <Draggable :list="list"> <!-- <<< here --> ...
I expect: the list not will be change Why? Because :list="list" is a prop
:list="list"
If we want to change, should work two ways:
<Draggable v-model="list"> <Draggable :model-value="list2" @update:model-value="list2 = $event">
<Draggable :list="list" @change="manualChangeList">
but not
<Draggable :list="list">
https://vuejs.org/guide/components/props.html#one-way-data-flow I caught unexpected behavior, which gave rise to a couple of bugs in my code that I had to look for
Hi
I expect: the list not will be change Why? Because
:list="list"
is a propIf we want to change, should work two ways:
but not
https://vuejs.org/guide/components/props.html#one-way-data-flow I caught unexpected behavior, which gave rise to a couple of bugs in my code that I had to look for