fix(module: table): check null in set sorter method (#1423)

This commit is contained in:
James Yeung 2021-04-27 16:37:19 +08:00 committed by GitHub
parent b22f9495f4
commit bcb9effc75

View File

@ -263,7 +263,7 @@ namespace AntDesign
private void SetSorter(SortDirection sortDirection) private void SetSorter(SortDirection sortDirection)
{ {
_sortDirection = sortDirection; _sortDirection = sortDirection;
SortModel.SetSortDirection(sortDirection); SortModel?.SetSortDirection(sortDirection);
} }
private void ToggleTreeNode() private void ToggleTreeNode()
@ -379,7 +379,7 @@ namespace AntDesign
private void InitFilters() private void InitFilters()
{ {
Filters = new List<TableFilter<TData>>() {GetNewFilter()}; Filters = new List<TableFilter<TData>>() { GetNewFilter() };
} }
} }
} }