mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix(frontend): resolve inbox scrolling top issue
This commit is contained in:
parent
c2cbb6d482
commit
60fa9482c5
@ -57,10 +57,19 @@ export const SubscribersList = (props: {
|
|||||||
</Grid>
|
</Grid>
|
||||||
{subscribers?.length > 0 ? (
|
{subscribers?.length > 0 ? (
|
||||||
<ConversationList
|
<ConversationList
|
||||||
scrollable
|
style={{ overflow: "auto" }}
|
||||||
loading={isFetching}
|
loading={isFetching}
|
||||||
loadingMore={isFetching}
|
loadingMore={isFetching}
|
||||||
onYReachEnd={handleLoadMore}
|
onScroll={({ target }) => {
|
||||||
|
const container = target as HTMLDivElement;
|
||||||
|
|
||||||
|
if (
|
||||||
|
container.scrollTop + container.clientHeight >=
|
||||||
|
container.scrollHeight
|
||||||
|
) {
|
||||||
|
handleLoadMore();
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{subscribers.map((subscriber) => (
|
{subscribers.map((subscriber) => (
|
||||||
<Conversation
|
<Conversation
|
||||||
|
Loading…
Reference in New Issue
Block a user