fix(task): focusing on assignee search field when activating it
This commit is contained in:
parent
d7fb1a1e14
commit
820823b5c3
@ -1,8 +1,4 @@
|
||||
<template>
|
||||
<div
|
||||
tabindex="-1"
|
||||
@focus="focus"
|
||||
>
|
||||
<Multiselect
|
||||
:loading="listUserService.loading"
|
||||
:placeholder="$t('task.assignee.placeholder')"
|
||||
@ -13,7 +9,7 @@
|
||||
label="name"
|
||||
:select-placeholder="$t('task.assignee.selectPlaceholder')"
|
||||
v-model="assignees"
|
||||
ref="multiselect"
|
||||
ref="userSearchInputRef"
|
||||
>
|
||||
<template #tag="{item: user}">
|
||||
<span class="assignee">
|
||||
@ -24,7 +20,6 @@
|
||||
</span>
|
||||
</template>
|
||||
</Multiselect>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@ -41,7 +36,7 @@ import {success} from '@/message'
|
||||
import {useTaskStore} from '@/stores/tasks'
|
||||
|
||||
import type {IUser} from '@/modelTypes/IUser'
|
||||
import { getDisplayName } from '@/models/user'
|
||||
import {getDisplayName} from '@/models/user'
|
||||
|
||||
const props = defineProps({
|
||||
taskId: {
|
||||
@ -130,12 +125,6 @@ async function findUser(query: string) {
|
||||
function clearAllFoundUsers() {
|
||||
foundUsers.value = []
|
||||
}
|
||||
|
||||
const multiselect = ref()
|
||||
|
||||
function focus() {
|
||||
multiselect.value.focus()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
Loading…
x
Reference in New Issue
Block a user