Show also matches by id not only display name

The vue-at library only searches in the display name by default.
But luckily our server responds already only with matching items,
so we just filter none and show them all.

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-01-09 20:41:08 +01:00
Родитель 0a9cdace2e
Коммит afad3154a4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7076EA9751AACDDA
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -24,6 +24,7 @@
v-model="text"
name-key="label"
:members="autoCompleteMentionCandidates"
:filter-match="atFilter"
@at="handleAtEvent">
<template v-slot:item="scope">
<Avatar v-if="isMentionToAll(scope.item.id)"
@ -157,6 +158,16 @@ export default {
document.execCommand('insertText', false, text)
},
/**
* The vue-at library only searches in the display name by default.
* But luckily our server responds already only with matching items,
* so we just filter none and show them all.
* @returns {boolean} True as we never filter anything out
*/
atFilter() {
return true
},
/**
* Focuses the contenteditable div input
*/