added missing loadFromModelProps

This commit is contained in:
SrGooglo 2023-03-07 02:18:21 +00:00
parent 88e2931615
commit 354174b1b2

View File

@ -66,9 +66,18 @@ export class PostsListsComponent extends React.Component {
loading: true, loading: true,
}) })
const result = await fn({ let payload = {
trim: this.state.list.length, trim: this.state.list.length,
}).catch((err) => { }
if (this.props.loadFromModelProps) {
payload = {
...payload,
...this.props.loadFromModelProps,
}
}
const result = await fn(payload).catch((err) => {
console.error(err) console.error(err)
app.message.error("Failed to load more posts") app.message.error("Failed to load more posts")