Fixed #278 - Update sort icons

pull/310/head
cagataycivici 2020-04-17 22:38:11 +03:00
parent 5bdc34af46
commit 62cf07ecce
2 changed files with 10 additions and 10 deletions

View File

@ -125,9 +125,9 @@ export default {
return [
'p-sortable-column-icon pi pi-fw', {
'pi-sort': !sorted,
'pi-sort-up': sorted && sortOrder > 0,
'pi-sort-down': sorted && sortOrder < 0
'pi-sort-alt': !sorted,
'pi-sort-amount-up-alt': sorted && sortOrder > 0,
'pi-sort-amount-down': sorted && sortOrder < 0
}
];
},
@ -176,9 +176,9 @@ export default {
getAriaSort(column) {
if (column.sortable) {
const sortIcon = this.getSortableColumnIcon(column);
if (sortIcon[1]['pi-sort-down'])
if (sortIcon[1]['pi-sort-amount-down'])
return 'descending';
else if (sortIcon[1]['pi-sort-up'])
else if (sortIcon[1]['pi-sort-amount-up-alt'])
return 'ascending';
else
return 'none';

View File

@ -393,9 +393,9 @@ export default {
return [
'p-sortable-column-icon pi pi-fw', {
'pi-sort': !sorted,
'pi-sort-up': sorted && sortOrder > 0,
'pi-sort-down': sorted && sortOrder < 0
'pi-sort-alt': !sorted,
'pi-sort-amount-up-alt': sorted && sortOrder > 0,
'pi-sort-amount-down': sorted && sortOrder < 0
}
];
},
@ -732,9 +732,9 @@ export default {
getAriaSort(column) {
if (column.sortable) {
const sortIcon = this.getSortableColumnIcon(column);
if (sortIcon[1]['pi-sort-down'])
if (sortIcon[1]['pi-sort-amount-down'])
return 'descending';
else if (sortIcon[1]['pi-sort-up'])
else if (sortIcon[1]['pi-sort-amount-up-alt'])
return 'ascending';
else
return 'none';