Merge pull request #1857 from nextcloud/sortBoards

This commit is contained in:
Julius Härtl
2020-05-14 10:33:11 +02:00
committed by GitHub

View File

@@ -29,7 +29,7 @@
{{ text }} {{ text }}
</a> </a>
<ul v-if="boards.length > 0"> <ul v-if="boards.length > 0">
<AppNavigationBoard v-for="board in boards" :key="board.id" :board="board" /> <AppNavigationBoard v-for="board in boardsSorted" :key="board.id" :board="board" />
</ul> </ul>
</li> </li>
</template> </template>
@@ -78,6 +78,9 @@ export default {
} }
}, },
computed: { computed: {
boardsSorted() {
return [...this.boards].sort((a, b) => (a.title < b.title) ? -1 : 1)
},
collapsible() { collapsible() {
return this.boards.length > 0 return this.boards.length > 0
}, },