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
Property | Type | Description | Optional |
---|---|---|---|
nextOnScrollTop | Function | Function to call when scrolling to the top. | |
nextOnScrollBottom | Function | Function to call when scrolling to the bottom. | |
callNextOnTop | boolean | Whether to call nextOnScrollTop when reaching the top. | |
callNextOnBottom | boolean | Whether to call nextOnScrollBottom when reaching the bottom. | |
dataLength | number | The number of items in the data list. | |
bottomReferenceDiv | MutableRefObject<HTMLDivElement | null> | Ref for the bottom reference div. |
CSS Classnames
Classname | Description |
---|---|
scroll-to-bottom-shortcut | Shortcut for scrolling to the bottom of the container. |
lm-dual-scroll-container | Container 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