From 41907236d707c04edb5a182959a0bafb472195ac Mon Sep 17 00:00:00 2001 From: Gamebrary <contact@gamebrary.com> Date: Thu, 18 Aug 2022 15:42:43 -0700 Subject: [PATCH] search page, disable boards without lists --- src/pages/SearchPage.vue | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/pages/SearchPage.vue b/src/pages/SearchPage.vue index c947b922..533e61c5 100644 --- a/src/pages/SearchPage.vue +++ b/src/pages/SearchPage.vue @@ -27,7 +27,8 @@ <b-dropdown-item v-for="board in boards" :key="board.id" - :to="{ name: 'search', query: { boardId: board.id, listIndex: boardListIndex } }" + :disabled="!board.lists.length" + :to="{ name: 'search', query: { boardId: board.id, listIndex: 0 } }" > {{ board.name }} </b-dropdown-item> @@ -41,11 +42,10 @@ :text="activeBoardList.name" > <b-dropdown-item - v-for="(list, index) in activeBoard.lists" + v-for="(list, listIndex) in activeBoard.lists" :key="list.id" - :to="{ name: 'search', query: { boardId: activeBoard.id, listIndex: index } }" + :to="{ name: 'search', query: { boardId: activeBoard.id, listIndex } }" > - <!-- :to="{ name: 'search', query: { boardId: board.id, listIndex: boardListIndex } }" --> {{ list.name }} </b-dropdown-item> </b-dropdown> @@ -138,10 +138,6 @@ export default { query(value) { this.search(value); }, - - boardId(value) { - console.log('board changed', value); - }, }, async mounted() {