ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Option to place the sort arrow next to the header-text instead of center of the column.

Open jasonmelgoza opened this issue 12 years ago • 3 comments

jasonmelgoza avatar Feb 08 '14 00:02 jasonmelgoza

Should be able to do this with CSS pretty easily. On Feb 7, 2014 6:25 PM, "Jason Melgoza" [email protected] wrote:

Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/ng-grid/issues/979 .

c0bra avatar Feb 08 '14 03:02 c0bra

Placing the sort arrows next to the labels might be easy with CSS but getting them to work with dynamic header lengths, resizable columns etc is very tricky, especially if they are to appear to the right of the header text.

I would agree with Jason that this should be built in as an option and even go as far as saying that the default placement should be on the right of the text so that the header is compact.

akommareddi avatar Feb 08 '14 03:02 akommareddi

Alternatively it would be nice to have a CSS class selector with .ngHeaderSortColumn and a another wrapper around the text included in .ngHeaderText. That way we could add a :after pseudo class and a descending or ascending sort arrow with just CSS.

We could write something like so:

.ngHeaderDescending .ngHeaderContent:after {
  content: '\25BC';
  display: inline-block;
  margin-right: 2px;
  margin-left: 10px;
  float: right;
}

jasonmelgoza avatar Feb 08 '14 21:02 jasonmelgoza