-
Notifications
You must be signed in to change notification settings - Fork 61
Show default sort caret #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show default sort caret #62
Conversation
Current coverage is 74.90% (diff: 100%)@@ master #62 diff @@
==========================================
Files 91 91
Lines 2537 2538 +1
Methods 76 76
Messages 0 0
Branches 230 229 -1
==========================================
+ Hits 1898 1901 +3
+ Misses 522 521 -1
+ Partials 117 116 -1
|
@@ -44,11 +44,17 @@ export const Column = ({ | |||
|
|||
const visibleColumns = columns.filter((_col) => !_col.hidden); | |||
|
|||
const sortedColumn = columns.filter((_col) => _col.sortDirection); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const sortedColumn = columns.find(col => col.sortDirection);
@@ -44,11 +44,17 @@ export const Column = ({ | |||
|
|||
const visibleColumns = columns.filter((_col) => !_col.hidden); | |||
|
|||
const sortedColumn = columns.filter((_col) => _col.sortDirection); | |||
|
|||
const shouldShowCaret = sortedColumn.length > 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're using find
instead of filter
, we no longer need to check on length, just that the value exists.
.get('width') | ||
).toContain('%'); | ||
|
||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great looking test case!
@KucharJ aside from the couple of small comments, this looks great! |
No description provided.