Close channel autocomplete if multiple tildes are typed (#2138)
This commit is contained in:
parent
8a93b6b91e
commit
1d37f9bbec
1 changed files with 7 additions and 1 deletions
|
|
@ -46,7 +46,13 @@ export const getMatchTermForChannelMention = (() => {
|
|||
lastValue = value;
|
||||
lastIsSearch = isSearch;
|
||||
if (match) {
|
||||
lastMatchTerm = isSearch ? match[1] : match[2];
|
||||
if (isSearch) {
|
||||
lastMatchTerm = match[1];
|
||||
} else if (match.index > 0 && value[match.index - 1] === '~') {
|
||||
lastMatchTerm = null;
|
||||
} else {
|
||||
lastMatchTerm = match[2];
|
||||
}
|
||||
} else {
|
||||
lastMatchTerm = null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue