Skip to content

Commit 7b749f1

Browse files
authored
fix: Agenda mobile goto now (ietf-tools#8160)
* fix: agenda mobile goto now * fix: manually close the dropdown
1 parent de49479 commit 7b749f1

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

client/agenda/AgendaMobileBar.vue

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
n-dropdown(
44
:options='jumpToDayOptions'
55
size='huge'
6+
:show='isDropdownOpenRef'
67
:show-arrow='true'
78
trigger='click'
89
@select='jumpToDay'
10+
@clickoutside='handleCloseDropdown'
911
)
10-
button
12+
button(@click='handleOpenDropdown')
1113
i.bi.bi-arrow-down-circle
1214
button(@click='agendaStore.$patch({ filterShown: true })')
1315
i.bi.bi-funnel
@@ -28,7 +30,7 @@
2830
</template>
2931

3032
<script setup>
31-
import { computed, h } from 'vue'
33+
import { computed, h, ref } from 'vue'
3234
import {
3335
NBadge,
3436
NDropdown,
@@ -61,7 +63,8 @@ function optionToLink(opts){
6163
{
6264
class: 'dropdown-link',
6365
'data-testid': 'mobile-link',
64-
href: `#${key}`
66+
href: `#${key}`,
67+
onClick: () => jumpToDay(key)
6568
},
6669
[
6770
h(
@@ -77,6 +80,12 @@ function optionToLink(opts){
7780
}
7881
}
7982
83+
const isDropdownOpenRef = ref(false)
84+
85+
const handleOpenDropdown = () => isDropdownOpenRef.value = true
86+
87+
const handleCloseDropdown = () => isDropdownOpenRef.value = false
88+
8089
const jumpToDayOptions = computed(() => {
8190
const days = []
8291
if (agendaStore.isMeetingLive) {
@@ -124,6 +133,7 @@ function jumpToDay (dayId) {
124133
} else {
125134
document.getElementById(dayId)?.scrollIntoView(true)
126135
}
136+
isDropdownOpenRef.value = false
127137
}
128138
129139
function downloadIcs (key) {

0 commit comments

Comments
 (0)