mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
Feat / Reusable SearchField + Fixed Messages align bottom flex with scroll (first message starts at bottom) (#151)
* feat(phone/ui): Make SearchField a reusable component * Fixed conversation scrolling and align bottom * feat(phone/ui): Autoscroll fix * feat(phone/ui): Autoscroll fix remove unused deps * feat(phone/ui): Autoscroll add needed dep for new messages
This commit is contained in:
1 parent
1659fa1654
commit
e56ae415dc
13 files changed
+162
-196
No files matched your search
@@ -82,13 +82,13 @@ export const MessageModal = () => {
|
||||
}, [groupId, setActiveMessageGroup]);
|
||||
|
||||
useEffect(() => {
|
||||
if (messages) {
|
||||
if (isLoaded && messages) {
|
||||
const element = document.getElementById(CONVERSATION_ELEMENT_ID);
|
||||
if (element) {
|
||||
element.scrollTop = element.scrollHeight;
|
||||
}
|
||||
}
|
||||
}, [messages]);
|
||||
}, [isLoaded, messages]);
|
||||
|
||||
// sends all unread messages
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Block a user