From bcb9effc75d5bf043ba86382f79cd7351ca85cf8 Mon Sep 17 00:00:00 2001 From: James Yeung Date: Tue, 27 Apr 2021 16:37:19 +0800 Subject: [PATCH] fix(module: table): check null in set sorter method (#1423) --- components/table/Column.razor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/table/Column.razor.cs b/components/table/Column.razor.cs index 2c944f19..ea62d0ee 100644 --- a/components/table/Column.razor.cs +++ b/components/table/Column.razor.cs @@ -263,7 +263,7 @@ namespace AntDesign private void SetSorter(SortDirection sortDirection) { _sortDirection = sortDirection; - SortModel.SetSortDirection(sortDirection); + SortModel?.SetSortDirection(sortDirection); } private void ToggleTreeNode() @@ -379,7 +379,7 @@ namespace AntDesign private void InitFilters() { - Filters = new List>() {GetNewFilter()}; + Filters = new List>() { GetNewFilter() }; } } }