Skip to content

Commit

Permalink
Update helpers.ts lint
Browse files Browse the repository at this point in the history
  • Loading branch information
johanrd authored Feb 21, 2024
1 parent 30081d2 commit bf26210
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions ember-headless-table/src/plugins/data-sorting/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,32 @@ import type { Column } from '[public-types]';
/**
* Query a specific column's current sort direction
*/
export const sortDirection = <DataType = unknown>(column: Column<DataType>) => meta.forColumn(column, Sorting).sortDirection;
export const sortDirection = <DataType = unknown>(column: Column<DataType>) =>
meta.forColumn(column, Sorting).sortDirection;

/**
* Ask if a column is sortable
*/
export const isSortable = <DataType = unknown>(column: Column<DataType>) => meta.forColumn(column, Sorting).isSortable;
export const isSortable = <DataType = unknown>(column: Column<DataType>) =>
meta.forColumn(column, Sorting).isSortable;

/**
* Ask if a column is ascending
*/
export const isAscending = <DataType = unknown>(column: Column<DataType>) => meta.forColumn(column, Sorting).isAscending;
export const isAscending = <DataType = unknown>(column: Column<DataType>) =>
meta.forColumn(column, Sorting).isAscending;

/**
* Ask if a column is sorted descending
*/
export const isDescending = <DataType = unknown>(column: Column<DataType>) => meta.forColumn(column, Sorting).isDescending;
export const isDescending = <DataType = unknown>(column: Column<DataType>) =>
meta.forColumn(column, Sorting).isDescending;

/**
* Ask if a column is not sorted
*/
export const isUnsorted = <DataType = unknown>(column: Column<DataType>) => meta.forColumn(column, Sorting).isUnsorted;
export const isUnsorted = <DataType = unknown>(column: Column<DataType>) =>
meta.forColumn(column, Sorting).isUnsorted;

/**
* Sort the specified column's data using a tri-toggle.
Expand Down

0 comments on commit bf26210

Please sign in to comment.