diff --git a/docs/api.md b/docs/api.md index 113a267..55ca580 100644 --- a/docs/api.md +++ b/docs/api.md @@ -438,12 +438,12 @@ The following properties are available on every `Column` object returned by the - This function is used to resolve any props needed for this column's UI that is responsible for toggling the sort direction when the user clicks it. - You can use the `getSortByToggleProps` hook to extend its functionality. - Custom props may be passed. **NOTE: Custom props may override built-in sortBy props, so be careful!** -- `sorted: Boolean` +- `isSorted: Boolean` - Denotes whether this column is currently being sorted - `sortedIndex: Int` - If the column is currently sorted, this integer will be the index in the `sortBy` array from state that corresponds to this column. - If this column is not sorted, the index will always be `-1` -- `sortedDesc: Bool` +- `isSortedDesc: Bool` - If the column is currently sorted, this denotes whether the column's sort direction is descending or not. - If `true`, the column is sorted `descending` - If `false`, the column is sorted `ascending` @@ -477,10 +477,10 @@ function Table({ columns, data }) { {/* Add a sort direction indicator */} - {column.sorted ? (column.sortedDesc ? ' 🔽' : ' 🔼') : ''} + {column.isSorted ? (column.isSortedDesc ? ' 🔽' : ' 🔼') : ''} {/* Add a sort index indicator */} - ({column.sorted ? column.sortedIndex + 1 : ''}) + ({column.isSorted ? column.sortedIndex + 1 : ''}) ))}