Browse Source

Only show tribute menu after a minlength of 3 characters.

- Fixes #562
unoptim
Dessalines 2 years ago
parent
commit
fb62a141b5
  1. 2
      package.json
  2. 3
      src/utils.ts
  3. 8
      yarn.lock

2
package.json

@ -43,7 +43,7 @@
"terser": "^4.6.3",
"tippy.js": "^6.0.0",
"toastify-js": "^1.6.2",
"tributejs": "^4.1.1",
"tributejs": "^5.0.0",
"twemoji": "^12.1.2",
"ws": "^7.0.0"
},

3
src/utils.ts

@ -446,6 +446,7 @@ export function setupTribute(): Tribute {
allowSpaces: false,
autocompleteMode: true,
menuItemLimit: mentionDropdownFetchLimit,
menuShowMinLength: 3,
},
// Users
{
@ -459,6 +460,7 @@ export function setupTribute(): Tribute {
allowSpaces: false,
autocompleteMode: true,
menuItemLimit: mentionDropdownFetchLimit,
menuShowMinLength: 3,
},
// Communities
@ -473,6 +475,7 @@ export function setupTribute(): Tribute {
allowSpaces: false,
autocompleteMode: true,
menuItemLimit: mentionDropdownFetchLimit,
menuShowMinLength: 3,
},
],
});

8
yarn.lock

@ -4506,10 +4506,10 @@ [email protected]~2.4.3:
psl "^1.1.24"
punycode "^1.4.1"
[email protected]^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/tributejs/-/tributejs-4.1.1.tgz#f169a4ad12e485241140ec1ab987b460950c974c"
integrity sha512-jc+PcaiNzMjCn2LAQb3i4ic94EsSfLW8Jlk1sK2cb6hLcZFalU9ThcF8rxuKkTUKv1GIvTwN8XseLzCXLxB4lw==
[email protected]^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/tributejs/-/tributejs-5.0.0.tgz#2c5301a79c19d7a72d23e995bf7c9f47c2a34f23"
integrity sha512-aPUpq4+NTXRq1OcdoeiFg9d+wM+J0b7dpL7MNVxqo8JIgChtkx8HnsPVl/uZ4Z1ChTF9UI1ffbvTfJRHqJjjAw==
[email protected]^8.6.2:
version "8.6.2"

Loading…
Cancel
Save