fix: Agenda mobile goto now (#8160)
* fix: agenda mobile goto now * fix: manually close the dropdown
This commit is contained in:
parent
de494790b6
commit
7b749f1623
|
@ -3,11 +3,13 @@
|
||||||
n-dropdown(
|
n-dropdown(
|
||||||
:options='jumpToDayOptions'
|
:options='jumpToDayOptions'
|
||||||
size='huge'
|
size='huge'
|
||||||
|
:show='isDropdownOpenRef'
|
||||||
:show-arrow='true'
|
:show-arrow='true'
|
||||||
trigger='click'
|
trigger='click'
|
||||||
@select='jumpToDay'
|
@select='jumpToDay'
|
||||||
|
@clickoutside='handleCloseDropdown'
|
||||||
)
|
)
|
||||||
button
|
button(@click='handleOpenDropdown')
|
||||||
i.bi.bi-arrow-down-circle
|
i.bi.bi-arrow-down-circle
|
||||||
button(@click='agendaStore.$patch({ filterShown: true })')
|
button(@click='agendaStore.$patch({ filterShown: true })')
|
||||||
i.bi.bi-funnel
|
i.bi.bi-funnel
|
||||||
|
@ -28,7 +30,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, h } from 'vue'
|
import { computed, h, ref } from 'vue'
|
||||||
import {
|
import {
|
||||||
NBadge,
|
NBadge,
|
||||||
NDropdown,
|
NDropdown,
|
||||||
|
@ -61,7 +63,8 @@ function optionToLink(opts){
|
||||||
{
|
{
|
||||||
class: 'dropdown-link',
|
class: 'dropdown-link',
|
||||||
'data-testid': 'mobile-link',
|
'data-testid': 'mobile-link',
|
||||||
href: `#${key}`
|
href: `#${key}`,
|
||||||
|
onClick: () => jumpToDay(key)
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
h(
|
h(
|
||||||
|
@ -77,6 +80,12 @@ function optionToLink(opts){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isDropdownOpenRef = ref(false)
|
||||||
|
|
||||||
|
const handleOpenDropdown = () => isDropdownOpenRef.value = true
|
||||||
|
|
||||||
|
const handleCloseDropdown = () => isDropdownOpenRef.value = false
|
||||||
|
|
||||||
const jumpToDayOptions = computed(() => {
|
const jumpToDayOptions = computed(() => {
|
||||||
const days = []
|
const days = []
|
||||||
if (agendaStore.isMeetingLive) {
|
if (agendaStore.isMeetingLive) {
|
||||||
|
@ -124,6 +133,7 @@ function jumpToDay (dayId) {
|
||||||
} else {
|
} else {
|
||||||
document.getElementById(dayId)?.scrollIntoView(true)
|
document.getElementById(dayId)?.scrollIntoView(true)
|
||||||
}
|
}
|
||||||
|
isDropdownOpenRef.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadIcs (key) {
|
function downloadIcs (key) {
|
||||||
|
|
Loading…
Reference in a new issue