Skip to content

Commit ca47b8a

Browse files
committed
feat(core): Adds sort priority number to header
The headers now show the sort priority of the column. This is done using a subscript tag that is pulled closer to the sort direction icon.
1 parent a0c5b7e commit ca47b8a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/less/header.less

+5
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@
7979
.sortable {
8080
cursor: pointer;
8181
}
82+
83+
// Moves the sort priority number closer to the icon
84+
.ui-grid-sort-priority-number {
85+
margin-left: -8px;
86+
}
8287
}
8388

8489
// Make vertical bar in header row fill the height of the cell completely

src/templates/ui-grid/uiGridHeaderCell.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@
2222
ng-class="{ 'ui-grid-icon-up-dir': col.sort.direction == asc, 'ui-grid-icon-down-dir': col.sort.direction == desc, 'ui-grid-icon-blank': !col.sort.direction }"
2323
title="{{col.sort.priority ? i18n.headerCell.priority + ' ' + col.sort.priority : null}}"
2424
aria-hidden="true">
25-
 
2625
</i>
26+
<sub
27+
class="ui-grid-sort-priority-number">
28+
{{col.sort.priority + 1}}
29+
</sub>
2730
</span>
2831
</div>
2932

0 commit comments

Comments
 (0)