Skip to content

Commit

Permalink
Merge pull request #5621 from nextcloud/fix/sidebar/hide-alarm-menu-o…
Browse files Browse the repository at this point in the history
…n-edit

fix(sidebar): hide alarm actions menu when starting to edit
  • Loading branch information
GretaD authored Dec 13, 2023
2 parents 0648771 + 25a6f13 commit 93c0601
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/Editor/Alarm/AlarmListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
</div>
<div v-if="!isReadOnly"
class="property-alarm-item__options">
<Actions>
<Actions :open="showMenu"
@update:open="(open) => showMenu = open">
<ActionRadio v-if="canChangeAlarmType || (!isAlarmTypeDisplay && forceEventAlarmType === 'DISPLAY')"
:name="alarmTypeName"
:checked="isAlarmTypeDisplay"
Expand Down Expand Up @@ -212,6 +213,7 @@ export default {
data() {
return {
isEditing: false,
showMenu: false,
}
},
computed: {
Expand Down Expand Up @@ -317,12 +319,17 @@ export default {
*/
toggleEditAlarm() {
this.isEditing = !this.isEditing

// Hide menu when starting to edit
if (this.isEditing) {
this.showMenu = false
}
},
/**
* This method closes the editing mode again
*/
closeAlarmEditor() {
this.isEditing = false
this.showMenu = false
},
/**
* Changes the type of the reminder
Expand Down

0 comments on commit 93c0601

Please sign in to comment.