mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 18:00:15 +01:00
fix: retain scroll view on delete convo
This commit is contained in:
parent
f1aabfa543
commit
8762765dd0
4 changed files with 18 additions and 13 deletions
|
|
@ -24,14 +24,15 @@ export default function Nav({ navVisible, setNavVisible }) {
|
|||
const scrollPositionRef = useRef(null);
|
||||
|
||||
const showMore = async (increment = true) => {
|
||||
if (increment) {
|
||||
const container = containerRef.current;
|
||||
if (container) {
|
||||
scrollPositionRef.current = container.scrollTop;
|
||||
}
|
||||
dispatch(incrementPage());
|
||||
const container = containerRef.current;
|
||||
if (container) {
|
||||
scrollPositionRef.current = container.scrollTop;
|
||||
}
|
||||
|
||||
if (increment) {
|
||||
dispatch(incrementPage());
|
||||
await mutate();
|
||||
}
|
||||
await mutate();
|
||||
};
|
||||
|
||||
useDidMountEffect(() => mutate(), [conversationId]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue