You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below given is the code I'm trying to implement.
Here, if I type my desired name, the source() function calls the renderList() and runs properly because matches is not empty.
The problem arises that if I mistype (or, write a name that does not exist, i.e., searchTerm does not match any name), the matches list becomes empty causing the renderList() to not able to show any list and thus closing the mention dropdown list. Now, if I delete the mistyped part, the mention dropdown should've reappeared, but it is reappearing only when I delete the whole searchTerm because it finds the mentionChar and then triggers the onOpen() method.
Is there any way that to not close the mention dropdown in case any matches are not found. Given I have the requirement to not show any suggestions if typed wrong or no matches found.
This discussion was converted from issue #332 on July 24, 2023 07:27.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Below given is the code I'm trying to implement.
Here, if I type my desired name, the
source()
function calls therenderList()
and runs properly becausematches
is not empty.The problem arises that if I mistype (or, write a name that does not exist, i.e.,
searchTerm
does not match any name), thematches
list becomes empty causing therenderList()
to not able to show any list and thus closing the mention dropdown list. Now, if I delete the mistyped part, the mention dropdown should've reappeared, but it is reappearing only when I delete the whole searchTerm because it finds the mentionChar and then triggers the onOpen() method.Is there any way that to not close the mention dropdown in case any matches are not found. Given I have the requirement to not show any suggestions if typed wrong or no matches found.
Beta Was this translation helpful? Give feedback.
All reactions