diff --git a/lib/ui/app/tables/app_paginated_data_table.dart b/lib/ui/app/tables/app_paginated_data_table.dart index a06c22bcb..00028ba46 100644 --- a/lib/ui/app/tables/app_paginated_data_table.dart +++ b/lib/ui/app/tables/app_paginated_data_table.dart @@ -72,6 +72,7 @@ class AppPaginatedDataTable extends StatefulWidget { this.initialFirstRowIndex = 0, this.onPageChanged, this.rowsPerPage = defaultRowsPerPage, + this.subtractOneFromCount = false, this.availableRowsPerPage = const [ defaultRowsPerPage, defaultRowsPerPage * 2, @@ -214,6 +215,8 @@ class AppPaginatedDataTable extends StatefulWidget { /// {@macro flutter.widgets.scrollable.dragStartBehavior} final DragStartBehavior dragStartBehavior; + final bool subtractOneFromCount; + @override AppPaginatedDataTableState createState() => AppPaginatedDataTableState(); } @@ -410,7 +413,7 @@ class AppPaginatedDataTableState extends State { localizations.pageRowsInfoTitle( _firstRowIndex + 1, _firstRowIndex + widget.rowsPerPage, - _rowCount, + _rowCount - (widget.subtractOneFromCount ? 1 : 0), _rowCountApproximate, ), ), diff --git a/lib/ui/reports/reports_screen.dart b/lib/ui/reports/reports_screen.dart index 9520f7a80..2110dbe76 100644 --- a/lib/ui/reports/reports_screen.dart +++ b/lib/ui/reports/reports_screen.dart @@ -677,6 +677,7 @@ class _ReportDataTableState extends State { padding: const EdgeInsets.all(12), child: AppPaginatedDataTable( //showFirstLastButtons: true, + subtractOneFromCount: true, header: SizedBox(), sortColumnIndex: sortedColumns.contains(reportSettings.sortColumn) ? sortedColumns.indexOf(reportSettings.sortColumn)