Skip to content

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

Merged
merged 2 commits into from
Oct 8, 2016

Conversation

KucharJ
Copy link

@KucharJ KucharJ commented Oct 7, 2016

No description provided.

@codecov-io
Copy link

codecov-io commented Oct 7, 2016

Current coverage is 74.90% (diff: 100%)

Merging #62 into master will increase coverage by 0.08%

@@             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   

Powered by Codecov. Last update deda6f4...b479f24

@@ -44,11 +44,17 @@ export const Column = ({

const visibleColumns = columns.filter((_col) => !_col.hidden);

const sortedColumn = columns.filter((_col) => _col.sortDirection);
Copy link
Owner

@bencripps bencripps Oct 8, 2016

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
Copy link
Owner

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('%');

});
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great looking test case!

@bencripps
Copy link
Owner

@KucharJ aside from the couple of small comments, this looks great!

@bencripps bencripps merged commit 3fb9d2c into bencripps:master Oct 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants