Performance: hide EmojiSelector until portaled

environments/review-chats-scro-mqhviw/deployments/2618
Alex Gleason 2023-02-14 11:20:25 -06:00
rodzic ec2235011f
commit 0aeeeb1dc4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 22 dodań i 18 usunięć

Wyświetl plik

@ -105,6 +105,7 @@ const StatusReactionWrapper: React.FC<IStatusReactionWrapper> = ({ statusId, chi
ref: setReferenceElement,
})}
{visible && (
<Portal>
<EmojiSelector
placement='top-start'
@ -113,6 +114,7 @@ const StatusReactionWrapper: React.FC<IStatusReactionWrapper> = ({ statusId, chi
visible={visible}
/>
</Portal>
)}
</div>
);
};

Wyświetl plik

@ -37,6 +37,7 @@ function ChatMessageReactionWrapper(props: IChatMessageReactionWrapper) {
onClick: onToggleVisibility,
})}
{isOpen && (
<Portal>
<EmojiSelector
visible={isOpen}
@ -47,6 +48,7 @@ function ChatMessageReactionWrapper(props: IChatMessageReactionWrapper) {
all={false}
/>
</Portal>
)}
</React.Fragment>
);
}