Correct table pages
This commit is contained in:
parent
a6e1a81e44
commit
645b0241a2
|
|
@ -28,6 +28,18 @@ abstract class ListUIState implements Built<ListUIState, ListUIStateBuilder> {
|
|||
@memoized
|
||||
int get hashCode;
|
||||
|
||||
int get tableHashCode =>
|
||||
custom1Filters.hashCode ^
|
||||
custom2Filters.hashCode ^
|
||||
custom3Filters.hashCode ^
|
||||
custom4Filters.hashCode ^
|
||||
stateFilters.hashCode ^
|
||||
statusFilters.hashCode ^
|
||||
filterClearedAt.hashCode ^
|
||||
filter.hashCode ^
|
||||
sortAscending.hashCode ^
|
||||
sortField.hashCode;
|
||||
|
||||
@nullable
|
||||
String get filter;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ class EntityList extends StatefulWidget {
|
|||
@required this.onClearMultiselect,
|
||||
this.presenter,
|
||||
this.tableColumns,
|
||||
}) : super(key: ValueKey('__${entityType}_${tableColumns}__'));
|
||||
}) : super(
|
||||
key: ValueKey(
|
||||
'__${entityType}_${tableColumns}_${state.uiState.filterEntityId}_${state.getUIState(entityType).listUIState.tableHashCode}__'));
|
||||
|
||||
final AppState state;
|
||||
final EntityType entityType;
|
||||
|
|
@ -209,16 +211,6 @@ class _EntityListState extends State<EntityList> {
|
|||
}
|
||||
|
||||
final rowsPerPage = state.prefState.rowsPerPage;
|
||||
final listStateHash = listUIState.custom1Filters.hashCode ^
|
||||
listUIState.custom2Filters.hashCode ^
|
||||
listUIState.custom3Filters.hashCode ^
|
||||
listUIState.custom4Filters.hashCode ^
|
||||
listUIState.stateFilters.hashCode ^
|
||||
listUIState.statusFilters.hashCode ^
|
||||
listUIState.filterClearedAt.hashCode ^
|
||||
listUIState.filter.hashCode ^
|
||||
listUIState.sortAscending.hashCode ^
|
||||
listUIState.sortField.hashCode;
|
||||
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
|
|
@ -241,8 +233,6 @@ class _EntityListState extends State<EntityList> {
|
|||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
child: AppPaginatedDataTable(
|
||||
key: ValueKey(
|
||||
'__${uiState.filterEntityId}_${uiState.filterEntityType}_${listStateHash}__'),
|
||||
onSelectAll: (value) {
|
||||
final startIndex =
|
||||
min(_firstRowIndex, entityList.length - 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue