Fix share select dropdown not opening when viewer is open

Signed-off-by: Christopher Ng <chrng8@gmail.com>
(cherry picked from commit 0c69619d91)
This commit is contained in:
Christopher Ng 2023-03-02 16:22:09 -08:00
parent 6577143e0b
commit d178f6a7c1
3 changed files with 10 additions and 3 deletions

View file

@ -34,6 +34,7 @@
:user-select="true"
:options="options"
v-model="value"
@open="handleOpen"
@search="asyncFind"
@option:selected="addShare">
<template #no-options="{ search }">
@ -46,6 +47,7 @@
<script>
import { generateOcsUrl } from '@nextcloud/router'
import { getCurrentUser } from '@nextcloud/auth'
import { emit } from '@nextcloud/event-bus'
import axios from '@nextcloud/axios'
import debounce from 'debounce'
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
@ -153,6 +155,11 @@ export default {
},
methods: {
handleOpen() {
// Fix dropdown not opening when viewer is open, see https://github.com/nextcloud/viewer/pull/1319
emit('viewer:trapElements:changed', this.$refs.select.$el)
},
async asyncFind(query) {
// save current query to check if we display
// recommendations or search results

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long