Skip to main content

ScrollContainer

ScrollContainer is the HOC for implementing scroll operations in LikeMinds Chat SDK. It supports the operation on both the scroll direction and is one of the key components on which the SDK rely on. It accepts the following set of props.

Props

PropertyTypeDescriptionOptional
nextOnScrollTopFunctionFunction to call when scrolling to the top.
nextOnScrollBottomFunctionFunction to call when scrolling to the bottom.
callNextOnTopbooleanWhether to call nextOnScrollTop when reaching the top.
callNextOnBottombooleanWhether to call nextOnScrollBottom when reaching the bottom.
dataLengthnumberThe number of items in the data list.
bottomReferenceDivMutableRefObject<HTMLDivElement | null>Ref for the bottom reference div.

CSS Classnames

ClassnameDescription
scroll-to-bottom-shortcutShortcut for scrolling to the bottom of the container.
lm-dual-scroll-containerContainer for handling dual scroll behavior for pagination.

Example

To customise the component with their classnames, Open your base css file and override the styles using the classname

.scroll-to-bottom-shortcut {
width: 24px;
height: 24px;
}

Reference

For reference checkout this file