Skip to content

Commit

Permalink
docs: add comment to sortable example
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewgallo committed Dec 6, 2024
1 parent fda64d7 commit 285554c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions react/sortable/src/Example/SortableColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ export const SortableColumns = () => {
header.column.columnDef.header,
header.getContext()
)}
{/*
This syntax is slightly odd so adding some additional context,
this uses index notation to choose an object property, either
one of the SortDirection values will be chosen (ie `asc` or `desc`)
or false, which means null will be applied here
*/}
{{
asc: <ArrowUp />,
desc: <ArrowUp className="descending-sorting-icon" />,
Expand Down

0 comments on commit 285554c

Please sign in to comment.