|
|
|
@ -11,7 +11,6 @@ const MessagesList = ({ messages, handlePreview, reference, longListLoading, get
|
|
|
|
|
|
|
|
|
|
// const messagesEndRef = useRef(null);
|
|
|
|
|
const messageRefs = useRef([]);
|
|
|
|
|
const prevProps = useRef(props)
|
|
|
|
|
|
|
|
|
|
const scrollToBottom = (force = false) => {
|
|
|
|
|
if (reference.current && (shouldScrollBottom || force)) {
|
|
|
|
@ -74,7 +73,7 @@ const MessagesList = ({ messages, handlePreview, reference, longListLoading, get
|
|
|
|
|
return (
|
|
|
|
|
<div className='relative h-full overflow-y-auto overflow-x-hidden flex flex-1'>
|
|
|
|
|
<div ref={reference} className='relative overflow-y-auto overflow-x-hidden block flex-1'>
|
|
|
|
|
{loadNextPage && (
|
|
|
|
|
{loadNextPage && messages.length>0 && (
|
|
|
|
|
<div className='text-center pt-3 mb-3 h-8 leading-8 '>
|
|
|
|
|
{!longListLoading ? <Button onClick={onLoadMore} type={'dashed'}>loading more</Button> : <LoadingOutlined className='text-primary' />}
|
|
|
|
|
</div>
|
|
|
|
|