Skip to content

Commit fc07b69

Browse files
committed
refactor(PluginsView): update button click handlers to close dropdown after action
1 parent eaa12d7 commit fc07b69

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

frontend/src/views/PluginsView/index.vue

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,29 @@ const onSortUpdate = debounce(pluginsStore.savePlugins, 1000)
236236
{{ t('plugins.hub') }}
237237
</Button>
238238
<Dropdown>
239-
<Button @click="handleUpdatePluginHub" :loading="pluginsStore.pluginHubLoading" type="link">
240-
{{ t('plugins.checkForUpdates') }}
241-
</Button>
242-
<template #overlay>
239+
<template #default="{ close }">
240+
<Button
241+
@click="
242+
() => {
243+
handleUpdatePluginHub()
244+
close()
245+
}
246+
"
247+
:loading="pluginsStore.pluginHubLoading"
248+
type="link"
249+
>
250+
{{ t('plugins.checkForUpdates') }}
251+
</Button>
252+
</template>
253+
<template #overlay="{ close }">
243254
<div class="p-4 min-w-128">
244255
<Button
245-
@click="handleUpdatePlugins"
256+
@click="
257+
() => {
258+
handleUpdatePlugins()
259+
close()
260+
}
261+
"
246262
:disabled="noUpdateNeeded"
247263
type="text"
248264
class="w-full"

0 commit comments

Comments
 (0)