Handle sorting by missing column

This commit is contained in:
Hillel Coren 2020-08-16 20:53:29 +03:00
parent 5cf79dd953
commit 4123dbb879
1 changed files with 3 additions and 1 deletions

View File

@ -213,7 +213,9 @@ class _EntityListState extends State<EntityList> {
],
source: dataTableSource,
sortColumnIndex:
widget.tableColumns.indexOf(listUIState.sortField),
widget.tableColumns.contains(listUIState.sortField)
? widget.tableColumns.indexOf(listUIState.sortField)
: 0,
sortAscending: listUIState.sortAscending,
rowsPerPage: state.prefState.rowsPerPage,
),