mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 11:01:22 +03:00
add maxScroll to chatmessage
This commit is contained in:
@@ -0,0 +1 @@
|
||||
PORT=3000
|
||||
@@ -0,0 +1 @@
|
||||
PORT=8080
|
||||
@@ -2,4 +2,5 @@
|
||||
export const gridSpacing = 3
|
||||
export const drawerWidth = 260
|
||||
export const appDrawerWidth = 320
|
||||
export const maxScroll = 100000
|
||||
export const baseURL = process.env.NODE_ENV === 'production' ? window.location.origin : window.location.origin.replace(':8080', ':3000')
|
||||
|
||||
@@ -34,6 +34,8 @@ import useApi from 'hooks/useApi'
|
||||
import useConfirm from 'hooks/useConfirm'
|
||||
import useNotifier from 'utils/useNotifier'
|
||||
|
||||
import { maxScroll } from 'store/constant'
|
||||
|
||||
export const ChatMessage = ({ chatflowid }) => {
|
||||
const theme = useTheme()
|
||||
const customization = useSelector((state) => state.customization)
|
||||
@@ -116,7 +118,7 @@ export const ChatMessage = ({ chatflowid }) => {
|
||||
|
||||
const scrollToBottom = () => {
|
||||
if (ps.current) {
|
||||
ps.current.scrollTo({ top: Number.MAX_SAFE_INTEGER, behavior: 'smooth' })
|
||||
ps.current.scrollTo({ top: maxScroll, behavior: 'smooth' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user