We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 046e322 commit 0f505bcCopy full SHA for 0f505bc
examples/tree/index.html
@@ -28,7 +28,7 @@
28
</div>
29
<ul v-show="open" v-if="isFolder">
30
<li class="item"
31
- v-repeat="model: model.children | sortByChildren"
+ v-repeat="model: model.children"
32
v-component="item">
33
</li>
34
<li v-on="click: addChild">+</li>
examples/tree/tree.js
@@ -42,15 +42,6 @@ Vue.component('item', {
42
this.model.children.length
43
}
44
},
45
- filters: {
46
- sortByChildren: function (list) {
47
- return list.slice().sort(function (a, b) {
48
- var alen = a.children ? 1 : 0
49
- var blen = b.children ? 1 : 0
50
- return alen > blen ? 1 : -1
51
- })
52
- }
53
- },
54
methods: {
55
toggle: function () {
56
if (this.isFolder) {
0 commit comments