This commit is contained in:
Hillel Coren 2020-02-15 21:30:40 +02:00
parent b26d50d5c9
commit b1d1a75f08
1 changed files with 22 additions and 21 deletions

View File

@ -280,28 +280,29 @@ class _ReportDataTableState extends State<ReportDataTable> {
), ),
), ),
FormCard( FormCard(
child: SingleChildScrollView( child: Column(
scrollDirection: Axis.horizontal, crossAxisAlignment: CrossAxisAlignment.stretch,
child: DataTable( children: <Widget>[
sortColumnIndex: reportSettings.sortIndex, DataTable(
sortAscending: reportSettings.sortAscending, sortColumnIndex: reportSettings.sortIndex,
columns: reportResult.tableColumns( sortAscending: reportSettings.sortAscending,
context, columns: reportResult.tableColumns(
(index, ascending) =>
widget.viewModel.onReportSorted(index, ascending)),
rows: [
reportResult.tableFilters(
context, context,
_textEditingControllers[ (index, ascending) =>
state.uiState.reportsUIState.report], (column, value) { widget.viewModel.onReportSorted(index, ascending)),
widget.viewModel.onReportFiltersChanged( rows: [
context, reportResult.tableFilters(context,
state.uiState.reportsUIState.filters _textEditingControllers[state.uiState.reportsUIState.report],
.rebuild((b) => b..addAll({column: value}))); (column, value) {
}), widget.viewModel.onReportFiltersChanged(
...reportResult.tableRows(context), context,
], state.uiState.reportsUIState.filters
), .rebuild((b) => b..addAll({column: value})));
}),
...reportResult.tableRows(context),
],
),
],
), ),
), ),
], ],