mirror of
https://github.com/coaidev/coai.git
synced 2025-05-24 23:40:14 +09:00
feat: update scroll area
This commit is contained in:
parent
27dd2c80f6
commit
6c2cb38867
@ -38,7 +38,11 @@ function ScrollAction(
|
||||
}, [target]);
|
||||
|
||||
useEffect(() => {
|
||||
if (messages.length === 0) return setVisibility(false);
|
||||
if (!target) return;
|
||||
|
||||
if (target.scrollHeight <= target.clientHeight) {
|
||||
setVisibility(false);
|
||||
}
|
||||
}, [messages]);
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user