SlickGrid icon indicating copy to clipboard operation
SlickGrid copied to clipboard

Inconsistency between sortable and non-sortable columns

Open andreasmueller92 opened this issue 6 years ago • 3 comments

When creating a grid with some sortable and some non-sortable columns, headers look a bit weird, as some of them have a bigger padding on the left than others.

This is caused by the fact that the span holding the glyph-icon that is indicating a sorted column is always shown.

My suggestion would be to only show it when an actual sorting happens.

This will also prevent headers of unsorted columns from moving when disabling sorting programatically.

andreasmueller92 avatar Aug 07 '18 07:08 andreasmueller92

Yeah, this has been dodgy for a while. The reason I often leave these things is that most developers have their own scheme they want to impose.
I am just in the process of tidying up the same issue, so I'll release something in the next few days. @ghiscoding right aligns the icon in the column.

I recall choosing to always show it because otherwise displaying it on sort can cause rearranging of elements in the header. I suppose a proper boxing with overflow:hidden could cure that.

6pac avatar Aug 07 '18 07:08 6pac

@6pac on your next change for this, you can create a PR make me a reviewer. I could pull your code and give it a try in my libs and see if anything breaks. I would rather try before it's merged to master, if possible. Thanks

ghiscoding avatar Aug 08 '18 16:08 ghiscoding

No probs, I know I've broken your branch in the past :-< This is quite a tricky one, as it's CSS related and everyone seems to tweak it a bit. There's a distinct possibility any change will break a significant number of deployments.

6pac avatar Aug 08 '18 23:08 6pac

This is no longer an issue with our new v5.0.0 release with the new Alpine Theme

Single Sort image

Multi-Sort

image

ghiscoding avatar Sep 20 '23 14:09 ghiscoding