Skip to content

Commit

Permalink
Fixed #1329 - Update sortIcons
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Apr 16, 2020
1 parent 04a0615 commit 704cdab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/datatable/HeaderCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class HeaderCell extends Component {

getAriaSort(sorted, sortOrder) {
if (this.props.columnProps.sortable) {
let sortIcon = sorted ? sortOrder < 0 ? 'pi-sort-down' : 'pi-sort-up': 'pi-sort';
let sortIcon = sorted ? sortOrder < 0 ? 'pi-sort-amount-down' : 'pi-sort-amount-up-alt': 'pi-sort-alt';
if (sortIcon === 'pi-sort-down')
return 'descending';
else if (sortIcon === 'pi-sort-up')
Expand All @@ -119,7 +119,7 @@ export class HeaderCell extends Component {

renderSortIcon(sorted, sortOrder) {
if (this.props.columnProps.sortable) {
let sortIcon = sorted ? sortOrder < 0 ? 'pi-sort-down' : 'pi-sort-up': 'pi-sort';
let sortIcon = sorted ? sortOrder < 0 ? 'pi-sort-amount-down' : 'pi-sort-amount-up-alt': 'pi-sort-alt';
let sortIconClassName = classNames('p-sortable-column-icon pi pi-fw', sortIcon);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/treetable/TreeTableHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class TreeTableHeader extends Component {

renderSortIcon(column, sorted, sortOrder) {
if (column.props.sortable) {
const sortIcon = sorted ? sortOrder < 0 ? 'pi-sort-down' : 'pi-sort-up': 'pi-sort';
const sortIcon = sorted ? sortOrder < 0 ? 'pi-sort-amount-down' : 'pi-sort-amount-up-alt': 'pi-sort-alt';
const sortIconClassName = classNames('p-sortable-column-icon', 'pi pi-fw', sortIcon);

return (
Expand Down

0 comments on commit 704cdab

Please sign in to comment.