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