mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-29 07:26:28 +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>
|
<template>
|
||||||
<div v-if="params.data.supervised_by">
|
<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>
|
<template v-slot:field>
|
||||||
<div class="flex items-center gap-1 cursor-pointer h-9">
|
<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">
|
<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();
|
this.loadUsers();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
if (this.$refs.searchInput) {
|
|
||||||
this.$refs.searchInput.focus();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
canManage() {
|
canManage() {
|
||||||
return this.params.data.urls.update;
|
return this.params.data.urls.update;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
openFlyout() {
|
||||||
|
this.loadUsers();
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.searchInput) {
|
||||||
|
this.$refs.searchInput.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
loadUsers() {
|
loadUsers() {
|
||||||
axios.get(this.params.data.urls.assigned_users, {
|
axios.get(this.params.data.urls.assigned_users, {
|
||||||
params: {
|
params: {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue