UseChatScrollReturn
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:531
Properties
Section titled “Properties”hasNewMessages
Section titled “hasNewMessages”hasNewMessages:
boolean
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:546
Whether there are new messages below the current scroll position
isAtBottom
Section titled “isAtBottom”isAtBottom:
boolean
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:544
Whether the user is currently scrolled to the bottom
scrollContainerRef
Section titled “scrollContainerRef”scrollContainerRef:
RefObject<HTMLDivElement|null>
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:533
Ref to attach to the scrollable container element
scrollContentRef
Section titled “scrollContentRef”scrollContentRef:
RefObject<HTMLDivElement|null>
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:542
Ref for the element whose height changes trigger auto-scroll.
Attach this to the inner content element (the one that grows when
messages stream in). The hook observes its resize events so the list
stays pinned to the bottom during streaming, even when the
messages array length does not change.
scrollTo
Section titled “scrollTo”scrollTo: (
options) =>void
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:553
Scroll the container to an arbitrary position.
Thin wrapper over Element.scrollTo.
Parameters
Section titled “Parameters”options
Section titled “options”ScrollToOptions
Returns
Section titled “Returns”void
scrollToBottom
Section titled “scrollToBottom”scrollToBottom: (
behavior?) =>void
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:548
Programmatically scroll to the bottom
Parameters
Section titled “Parameters”behavior?
Section titled “behavior?”ScrollBehavior
Returns
Section titled “Returns”void
scrollToElement
Section titled “scrollToElement”scrollToElement: (
el,options?) =>void
Defined in: src/components/editor/ChatPanel/ChatPanel.types.ts:558
Scroll a specific element into view inside the container.
Thin wrapper over Element.scrollIntoView.
Parameters
Section titled “Parameters”HTMLElement
options?
Section titled “options?”ScrollIntoViewOptions
Returns
Section titled “Returns”void