Skip to content

Commit

Permalink
Merge pull request #943 from kecnry/fix-active-state-click-away
Browse files Browse the repository at this point in the history
fix active state of menu buttons when closing on click away
  • Loading branch information
pllim authored Oct 19, 2021
2 parents 589bf69 + 40d10bb commit 3dbc20f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions jdaviz/container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@
<v-row dense style="background-color: #205f76">
<v-col md="auto">
<j-tooltip tipid="viewer-toolbar-data">
<v-menu offset-y :close-on-content-click="false">
<v-menu offset-y :close-on-content-click="false" v-model="viewer.data_open">
<template v-slot:activator="{ on, attrs }">
<v-btn
text
elevation="3"
v-bind="attrs"
v-on="on"
color="white"
@click="viewer.data_open = !viewer.data_open"
:class="{active: viewer.data_open}">
Data
</v-btn>
Expand Down Expand Up @@ -62,9 +61,9 @@
</v-btn>
</j-tooltip>
<j-tooltip tipid='viewer-toolbar-menu'>
<v-menu offset-y :close-on-content-click="false" style="z-index: 10">
<v-menu offset-y :close-on-content-click="false" style="z-index: 10" v-model="viewer.layer_viewer_open">
<template v-slot:activator="{ on }">
<v-btn icon v-on="on" @click="viewer.layer_viewer_open = !viewer.layer_viewer_open" :class="{active : viewer.layer_viewer_open}" color="white">
<v-btn icon v-on="on" :class="{active : viewer.layer_viewer_open}" color="white">
<v-icon>tune</v-icon>
</v-btn>
</template>
Expand Down

0 comments on commit 3dbc20f

Please # to comment.