MCPcopy Create free account
hub / github.com/Detaysoft/react-chat-elements / onScroll

Function onScroll

src/MessageList/MessageList.tsx:98–116  ·  view source on GitHub ↗
(e: React.UIEvent<HTMLElement>)

Source from the content-addressed store, hash-verified

96 }
97
98 const onScroll = (e: React.UIEvent<HTMLElement>): void => {
99 var bottom = getBottom(e.currentTarget)
100 setScrollBottom(bottom)
101 if (toBottomHeight === '100%' || (toBottomHeight && bottom > toBottomHeight)) {
102 if (_downButton !== true) {
103 setDownButton(true)
104 setScrollBottom(bottom)
105 }
106 } else {
107 if (_downButton !== false) {
108 setDownButton(false)
109 setScrollBottom(bottom)
110 }
111 }
112
113 if (props.onScroll instanceof Function) {
114 props.onScroll(e)
115 }
116 }
117
118 const toBottom = (e: any) => {
119 if (!referance) return

Callers

nothing calls this directly

Calls 1

getBottomFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…