From c44929afe1abcf070dcfcf2d0cfd59186928190c Mon Sep 17 00:00:00 2001 From: AJ Date: Sat, 11 Oct 2025 22:17:46 -0400 Subject: [PATCH] Add pagination to transaction preview for large imports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When uploading files with more than 100 transactions, the preview now displays transactions in pages of 100 rows at a time. This prevents browser freezing when rendering thousands of form inputs and dramatically improves page load performance. - Show first 100 transactions by default with pagination controls - All transactions remain in DOM but hidden for instant page switching - Update counters and form submission to work across all pages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- MoneyMap/Pages/Upload.cshtml | 65 ++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 6 deletions(-) diff --git a/MoneyMap/Pages/Upload.cshtml b/MoneyMap/Pages/Upload.cshtml index e3563da..f517b99 100644 --- a/MoneyMap/Pages/Upload.cshtml +++ b/MoneyMap/Pages/Upload.cshtml @@ -44,6 +44,14 @@
Transaction Preview (@Model.PreviewTransactions.Count(p => !p.IsDuplicate) selected, @Model.PreviewTransactions.Count(p => p.IsDuplicate) duplicates) + @if (Model.PreviewTransactions.Count > 100) + { +
+ Showing 1-100 of @Model.PreviewTransactions.Count + + +
+ }
@@ -62,11 +70,12 @@ Status - + @for (int i = 0; i < Model.PreviewTransactions.Count; i++) { var preview = Model.PreviewTransactions[i]; - + var displayStyle = i >= 100 ? "display: none;" : ""; + }