added contentsRef

This commit is contained in:
SrGooglo 2022-11-24 11:40:36 +00:00
parent 8c280afbf2
commit a5fd4ecbf0

View File

@ -1,6 +1,5 @@
import React from "react" import React from "react"
import { Skeleton } from "antd" import { Skeleton } from "antd"
import { Icons } from "components/Icons"
import { PostsList } from "components" import { PostsList } from "components"
import Post from "models/post" import Post from "models/post"
@ -21,6 +20,8 @@ export default class UserPosts extends React.Component {
posts: [], posts: [],
} }
contentsRef = React.createRef()
loadData = async ({ loadData = async ({
trim, trim,
replace = false replace = false
@ -76,6 +77,7 @@ export default class UserPosts extends React.Component {
emptyListRender={emptyListRender} emptyListRender={emptyListRender}
onLoadMore={this.loadData} onLoadMore={this.loadData}
posts={this.state.posts} posts={this.state.posts}
ref={this.contentsRef}
/> />
} }
</div> </div>