Skip to content

Commit 2849195

Browse files
Merge pull request #5822 from Countly/disabled-tabs-clickability-issue
fix: prevent clicking on disabled tabs
2 parents fa50aa2 + badec99 commit 2849195

File tree

1 file changed

+5
-2
lines changed
  • frontend/express/public/javascripts/countly/vue/components

1 file changed

+5
-2
lines changed

frontend/express/public/javascripts/countly/vue/components/nav.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@
144144
}
145145
},
146146
methods: {
147-
setTab: function(name) {
147+
setTab: function(name, isDisabled) {
148+
if (isDisabled) {
149+
return;
150+
}
148151
var tab = this.tabs.filter(function(t) {
149152
return t.name === name;
150153
});
@@ -197,7 +200,7 @@
197200
:style="{cursor: tab.disabled ? \'not-allowed\' : \'pointer\', opacity: tab.disabled ? 0.5 : 1}"\
198201
v-bind:key="tab.name"\
199202
v-bind:class="[tabClasses, activeClasses(tab.name)]"\
200-
v-on:click="setTab(tab.name)"\
203+
v-on:click="setTab(tab.name, tab.disabled)"\
201204
v-if="(!tab.type) || (tab.type === \'mobile\' && !apps[app_id].type) || (apps[app_id].type === tab.type)"\
202205
>\
203206
<slot :name="tab.name" :tab="tab">\

0 commit comments

Comments
 (0)