-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: use pagination in transaction inputs/outputs list #188
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -18,18 +23,57 @@ const handleCellbaseInputs = (inputs: Cell[], outputs: Cell[]) => { | |||
} | |||
|
|||
export const TransactionComp = ({ transaction }: { transaction: Transaction }) => { |
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.
Based on the requirements here: #177 (comment)
This component should not be modified to use pagination mode, as it would result in multiple pages making a large number of requests, as seen in #177.
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.
this file is meant to be changed, I reverted src/components/TransactionItem/index.tsx
updated by e7ac2d2 |
}: { | ||
inputs?: Cell[] | ||
outputs?: Cell[] | ||
txHash?: string | ||
showReward?: boolean | ||
total?: number | ||
indiceOffset?: number |
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.
How about loading offset
from the url, the page_number
and page_size
parameters, and get the offset by (page_number - 1) * page_size
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.
There are input_cells_page_size/number
and output_page_size/number
params, if offset
is removed, then need to add another field like cell_input_output_type
to distinguish them
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.
In what case will the sizes of input cells and output cells be different? I didn't find an entry to update the size on the page.
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.
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.
Ya, we could add a drop box with some default options for the user @Kirl70 , like 5,10,15.
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.
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.
I found the page size
component exists in input list
and output list
, so their size
s are independent, am I right? @Sven-TBD
https://ckb-explorer-frontend-in-magickbase-repo-git-913f8b-magickbase.vercel.app/transaction/0xc0d63615267e6a30d871b6d35551619641ba699138c1337470f4cdb7f8b91f1b I have to select the |
|
Further updates will be submitted on #222 |
Resolves: Magickbase/ckb-explorer-public-issues#484
original PR: #177