fix(web): 🐛 fix Description column sort to handle nulls

This commit is contained in:
Collin M. Barrett 2021-01-31 15:17:37 -06:00
parent 132d374d77
commit 92d030eb91

View file

@ -113,7 +113,13 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
title="Description"
key="Description"
dataIndex={nameof<List>("description")}
sorter={(a, b) => a.description.localeCompare(b.description)}
sorter={(a, b) =>
a.description
? b.description
? a.description.localeCompare(b.description)
: -1
: 1
}
width={
!tablePageSize.isNarrowWindow && !tablePageSize.isWideWindow
? 423