From ecde1859a631ee34003b83a35d4d44a383689be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 24 Jan 2020 17:32:59 +0100 Subject: [PATCH] Make sure tabs can have a unique id that is not depending on the name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/AppSidebarTab/AppSidebarTab.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/AppSidebarTab/AppSidebarTab.vue b/src/components/AppSidebarTab/AppSidebarTab.vue index a5577f1ff4..23c5d9516a 100644 --- a/src/components/AppSidebarTab/AppSidebarTab.vue +++ b/src/components/AppSidebarTab/AppSidebarTab.vue @@ -39,6 +39,10 @@ export default { name: 'AppSidebarTab', props: { + id: { + type: String, + default: () => this.name.toLowerCase().replace(/ /g, '-') + }, name: { type: String, default: '', @@ -57,9 +61,6 @@ export default { }, computed: { - id() { - return this.name.toLowerCase().replace(/ /g, '-') - }, isActive() { return this.$parent.activeTab === this.id }