Skip to content

Commit

Permalink
Add icon to orderable DataTable columns
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya committed Aug 8, 2024
1 parent 6f01120 commit 2489461
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/data/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import { useStableCallback } from '../../hooks/use-stable-callback';
import { useSyncedRef } from '../../hooks/use-synced-ref';
import type { CompositeProps, Order, OrderDirection } from '../../types';
import { downcastRef } from '../../util/typing';
import { ArrowDownIcon, ArrowUpIcon, SpinnerSpokesIcon } from '../icons';
import {
ArrowDownIcon,
ArrowUpIcon,
OrderableIcon,
SpinnerSpokesIcon,
} from '../icons';
import { Button } from '../input';
import ScrollContext from './ScrollContext';
import Table from './Table';
Expand Down Expand Up @@ -369,6 +374,9 @@ export default function DataTable<Row>({
)}
</div>
)}
{!isActiveOrder && isOrderable && (
<OrderableIcon className="text-grey-5" />
)}
</HeaderComponent>
</TableCell>
);
Expand Down

0 comments on commit 2489461

Please sign in to comment.