mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-26 15:05:39 +08:00
Fix focus on search field [SCI-11964]
This commit is contained in:
parent
ae1d128588
commit
7d95fcf7f4
1 changed files with 9 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div v-if="params.data.supervised_by">
|
||||
<GeneralDropdown v-if="canManage" @open="loadUsers" @close="closeFlyout" position="right">
|
||||
<GeneralDropdown v-if="canManage" @open="openFlyout" @close="closeFlyout" position="right">
|
||||
<template v-slot:field>
|
||||
<div class="flex items-center gap-1 cursor-pointer h-9">
|
||||
<div v-if="params.data.supervised_by.id" class="flex items-center gap-2" :title="params.data.supervised_by.name">
|
||||
|
@ -75,19 +75,20 @@ export default {
|
|||
this.loadUsers();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.searchInput) {
|
||||
this.$refs.searchInput.focus();
|
||||
}
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
canManage() {
|
||||
return this.params.data.urls.update;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openFlyout() {
|
||||
this.loadUsers();
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.searchInput) {
|
||||
this.$refs.searchInput.focus();
|
||||
}
|
||||
});
|
||||
},
|
||||
loadUsers() {
|
||||
axios.get(this.params.data.urls.assigned_users, {
|
||||
params: {
|
||||
|
|
Loading…
Add table
Reference in a new issue