New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement an infinite loading for the deployment list page #559
Conversation
2273ef2
to
11c62ec
Compare
|
||
export type Deployment = Required<DeploymentModel.AsObject>; | ||
export type Stage = Required<PipelineStage.AsObject>; | ||
export type DeploymentStatusKey = keyof typeof DeploymentStatus; | ||
|
||
const ITEMS_PER_PAGE = 30; | ||
const ITEMS_PER_PAGE = 50; | ||
const FETCH_MORE_ITEMS_PER_PAGE = 30; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1回目(開く時)の数は50, 2回目から(load more)30ですね。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
お、これはありがたいです。
>("deployments/fetchMoreList", async (_, thunkAPI) => { | ||
const { deployments, deploymentFilterOptions } = thunkAPI.getState(); | ||
const lastItem = selectLastItem(deployments); | ||
const maxUpdatedAt = lastItem ? lastItem.updatedAt : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thank you. |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: