reachat 2.1.0-alpha.3 → 2.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CSVFileRenderer-CpB8ngRc.js → CSVFileRenderer-DodyJ8ty.js} +2 -2
- package/dist/{CSVFileRenderer-CpB8ngRc.js.map → CSVFileRenderer-DodyJ8ty.js.map} +1 -1
- package/dist/{DefaultFileRenderer-DEgyNAd4.js → DefaultFileRenderer-CjPMoUSC.js} +2 -2
- package/dist/{DefaultFileRenderer-DEgyNAd4.js.map → DefaultFileRenderer-CjPMoUSC.js.map} +1 -1
- package/dist/SessionMessages/SessionMessages.d.ts +4 -0
- package/dist/docs.json +21 -0
- package/dist/{index-DVFyp_Cz.js → index-B0_s-rPq.js} +7 -6
- package/dist/index-B0_s-rPq.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +4 -3
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/dist/index-DVFyp_Cz.js.map +0 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1868,18 +1868,19 @@ ${response}`),
|
|
|
1868
1868
|
children,
|
|
1869
1869
|
newSessionContent,
|
|
1870
1870
|
limit = 10,
|
|
1871
|
-
showMoreText = "Show more"
|
|
1871
|
+
showMoreText = "Show more",
|
|
1872
|
+
autoScroll = true
|
|
1872
1873
|
}) => {
|
|
1873
1874
|
const { activeSession, theme } = React.useContext(ChatContext);
|
|
1874
1875
|
const contentRef = React.useRef(null);
|
|
1875
1876
|
const [isAnimating, setIsAnimating] = React.useState(true);
|
|
1876
1877
|
React.useEffect(() => {
|
|
1877
|
-
if (contentRef.current) {
|
|
1878
|
+
if (contentRef.current && autoScroll) {
|
|
1878
1879
|
requestAnimationFrame(
|
|
1879
1880
|
() => contentRef.current.scrollTop = contentRef.current.scrollHeight
|
|
1880
1881
|
);
|
|
1881
1882
|
}
|
|
1882
|
-
}, [activeSession, isAnimating]);
|
|
1883
|
+
}, [activeSession, autoScroll, isAnimating]);
|
|
1883
1884
|
function handleShowMore() {
|
|
1884
1885
|
showNext(limit);
|
|
1885
1886
|
requestAnimationFrame(() => contentRef.current.scrollTop = 0);
|