Skip to content

Commit a0b4a90

Browse files
authored
List transition example fix (#2611)
* reset id for new items * more consistent syntax for composition api
1 parent 09d541a commit a0b4a90

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/examples/src/list-transition/App/composition.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default {
1414

1515
function reset() {
1616
items.value = getInitialItems()
17+
id = items.value.length + 1
1718
}
1819

1920
function shuffle() {

src/examples/src/list-transition/App/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default {
1616
},
1717
reset() {
1818
this.items = getInitialItems()
19+
id = getInitialItems().length + 1
1920
},
2021
shuffle() {
2122
this.items = shuffle(this.items)

0 commit comments

Comments
 (0)