Skip to content

Commit

Permalink
Close dropdown menu when an item is clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobesson committed Apr 5, 2019
1 parent 70251dc commit e9b69e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/views/documents/utils/DisplayModeSwitch.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<dropdown-button class="is-right">
<dropdown-button class="is-right" ref="displayModeSwitch">
<span slot="button" class="button is-small">
<fa-icon :icon="['fas', 'eye']" class="is-size-4" />
<span>&nbsp;</span>
Expand All @@ -8,7 +8,7 @@
<a
class="dropdown-item is-size-6"
:class="{'is-active': value==='result'}"
@click="$emit('input', 'result')">
@click="$refs.displayModeSwitch.isActive = false; $emit('input', 'result')">
<span class="has-text-centered item-icons">
<fa-icon :icon="listMode ? 'th-list' : 'th'" />
</span>
Expand All @@ -17,7 +17,7 @@
<a
class="dropdown-item is-size-6"
:class="{'is-active': value==='both'}"
@click="$emit('input', 'both')">
@click="$refs.displayModeSwitch.isActive = false; $emit('input', 'both')">
<span class="is-nowrap item-icons">
<fa-icon :icon="listMode ? 'th-list' : 'th'" />
<fa-icon icon="map-marked-alt" />
Expand All @@ -27,7 +27,7 @@
<a
class="dropdown-item is-size-6"
:class="{'is-active': value==='map'}"
@click="$emit('input', 'map')">
@click="$refs.displayModeSwitch.isActive = false; $emit('input', 'map')">
<span class="has-text-centered item-icons">
<fa-icon icon="map-marked-alt" />
</span>
Expand Down

0 comments on commit e9b69e0

Please sign in to comment.