Skip to content

Commit 93f2cc4

Browse files
committed
feat: visually indicate sortable column
1 parent c3e721c commit 93f2cc4

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/shared/zarizeni-list/Header.styl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
padding 0.3em
1919
word-break keep-all
2020

21+
&.glyphicon.shadowed
22+
color black
23+
opacity 0.2
24+
25+
&.glyphicon.active
26+
color #dc0000
27+
2128
& .filterIcon
2229
cursor pointer
2330
&:before

src/shared/zarizeni-list/HeaderCell.jsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/** Created by hhj on 1/20/16. */
2+
/* eslint-disable no-nested-ternary */
23
import React, { PropTypes } from 'react'
34
import HeaderFilter from './HeaderFilter'
45
import './Header.styl'
@@ -14,8 +15,13 @@ export default class HeaderCell extends React.Component {
1415

1516
render() {
1617
const { sort, filter, column, onSortChange, onFilterChange } = this.props
17-
const arrowDirection = sort.dir ? 'up' : 'down'
18-
const arrow = sort.by === column.name ? `glyphicon-arrow-${arrowDirection}` : ''
18+
const arrowDirection = sort.dir ? '-alt' : ''
19+
const arrow =
20+
!column.sortable ? (
21+
''
22+
) : sort.by === column.name ? (
23+
`glyphicon-sort-by-attributes${arrowDirection} active`
24+
) : 'glyphicon-sort shadowed'
1925

2026
return (
2127
<div className={'myTableRowItem' + ` uFlexGrow-${column.width}`}>

0 commit comments

Comments
 (0)