mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix(web): 🐛 fix Description column sort to handle nulls
This commit is contained in:
parent
132d374d77
commit
92d030eb91
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue