fix: mobile MailList props for infinite scroll
This commit is contained in:
@@ -959,24 +959,19 @@ export function MailPage() {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<MailList
|
<MailList
|
||||||
mails={mails}
|
mails={processedMails}
|
||||||
selectedMailId={selectedMail?.id || null}
|
selectedMailId={selectedMail?.id || null}
|
||||||
onSelectMail={handleSelectMail}
|
onSelectMail={handleSelectMail}
|
||||||
loading={loadingMails}
|
loading={loadingMails}
|
||||||
currentPage={mailsPage}
|
|
||||||
total={mailsTotal}
|
|
||||||
pageSize={PAGE_SIZE}
|
|
||||||
onPageChange={setMailsPage}
|
|
||||||
selectedMailIds={selectedMailIds}
|
selectedMailIds={selectedMailIds}
|
||||||
onToggleSelect={handleToggleSelect}
|
onToggleSelect={handleToggleSelect}
|
||||||
onSelectAll={handleSelectAll}
|
onSelectAll={handleSelectAll}
|
||||||
sortBy={sortBy}
|
onLoadMore={() => {
|
||||||
sortOrder={sortOrder}
|
if (mails.length < mailsTotal) {
|
||||||
onSortChange={(by, order) => {
|
setMailsPage((p) => p + 1);
|
||||||
setSortBy(by);
|
}
|
||||||
setSortOrder(order);
|
|
||||||
setMailsPage(1);
|
|
||||||
}}
|
}}
|
||||||
|
hasMore={mails.length < mailsTotal}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user