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

blank header is not sortable

Open jadrake75 opened this issue 13 years ago • 5 comments

If you define a header with the following object:

{ field: 'wantList', displayName: '', resizeable: false, width: 28, cellTemplate: },

This is an icon column where the column either has a value or not (so it would be nice to sort on it). Using '' for the displayName does not enable sorting. If I change this to add a '-' or something it is sortable, but the look and feel is less than satisfactory.

jadrake75 avatar Jul 14 '13 03:07 jadrake75

Forgot to list I am using 2.0.7

jadrake75 avatar Jul 14 '13 03:07 jadrake75

You could add a non-breaking-space as the displayName.

displayName:"\u00A0"

http://plnkr.co/edit/3VVEzZ?p=preview

roblarsen avatar Aug 14 '13 15:08 roblarsen

I can confirm this works. Thanks!

jadrake75 avatar Aug 14 '13 19:08 jadrake75

Glad to be of service :+1:

roblarsen avatar Aug 14 '13 19:08 roblarsen

I have columns with varying text and hence few columns overall height is greater than the area of text within it. The column is sortable only while clicking on headerText. While clicking on empty space below text, the sorting doesn't work.

Using the above approach by @jadrake75 , one can create a small empty div, but it still do not go well with UX. Any plans to incorporate sorting on header div as such?? Infact are there any reasons for current implementation.??

soyiatgit avatar Nov 09 '16 10:11 soyiatgit