Fix column sorting not visible

Summary: Fixes a regression from D45394048. It "sortable" as a nullable column prop. When it is undefined it should be treated as true.

Reviewed By: LukeDefeo

Differential Revision: D45776216

fbshipit-source-id: dcd8ce97217086deab7b2b1852837fbfa7437d13
This commit is contained in:
Andrey Goncharov
2023-05-11 08:14:05 -07:00
committed by Facebook GitHub Bot
parent 94482f9782
commit 33ae7f23db

View File

@@ -175,7 +175,7 @@ function TableHeadColumn({
}; };
let divProps: HTMLAttributes<HTMLDivElement> = {}; let divProps: HTMLAttributes<HTMLDivElement> = {};
if (column.sortable) { if (column.sortable !== false) {
divProps = { divProps = {
onClick: (e) => { onClick: (e) => {
e.stopPropagation(); e.stopPropagation();
@@ -208,7 +208,7 @@ function TableHeadColumn({
) : ( ) : (
column.title column.title
)} )}
{column.sortable ? ( {column.sortable !== false ? (
<SortIcons <SortIcons
direction={sorted} direction={sorted}
onSort={(dir) => onSort={(dir) =>