Bot Command Tooltip: Fix flickering (again) (#1788)
This commit is contained in:
parent
a6a7f6d84f
commit
998a082b4e
@ -53,12 +53,12 @@ export default function useBotCommandTooltip(
|
|||||||
}, [getFilteredCommands, html, isAllowed, unmarkIsOpen]);
|
}, [getFilteredCommands, html, isAllowed, unmarkIsOpen]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (filteredBotCommands && filteredBotCommands.length) {
|
if (filteredBotCommands && filteredBotCommands.length && html.length > 0) {
|
||||||
markIsOpen();
|
markIsOpen();
|
||||||
} else {
|
} else {
|
||||||
unmarkIsOpen();
|
unmarkIsOpen();
|
||||||
}
|
}
|
||||||
}, [filteredBotCommands, markIsOpen, unmarkIsOpen]);
|
}, [filteredBotCommands, html.length, markIsOpen, unmarkIsOpen]);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isOpen,
|
isOpen,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user