Correct report row count
This commit is contained in:
parent
0f4ff64e6a
commit
a9393134b8
|
|
@ -72,6 +72,7 @@ class AppPaginatedDataTable extends StatefulWidget {
|
|||
this.initialFirstRowIndex = 0,
|
||||
this.onPageChanged,
|
||||
this.rowsPerPage = defaultRowsPerPage,
|
||||
this.subtractOneFromCount = false,
|
||||
this.availableRowsPerPage = const <int>[
|
||||
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<AppPaginatedDataTable> {
|
|||
localizations.pageRowsInfoTitle(
|
||||
_firstRowIndex + 1,
|
||||
_firstRowIndex + widget.rowsPerPage,
|
||||
_rowCount,
|
||||
_rowCount - (widget.subtractOneFromCount ? 1 : 0),
|
||||
_rowCountApproximate,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -677,6 +677,7 @@ class _ReportDataTableState extends State<ReportDataTable> {
|
|||
padding: const EdgeInsets.all(12),
|
||||
child: AppPaginatedDataTable(
|
||||
//showFirstLastButtons: true,
|
||||
subtractOneFromCount: true,
|
||||
header: SizedBox(),
|
||||
sortColumnIndex: sortedColumns.contains(reportSettings.sortColumn)
|
||||
? sortedColumns.indexOf(reportSettings.sortColumn)
|
||||
|
|
|
|||
Loading…
Reference in New Issue