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

Option to disable multi-column sorting

Open smehrbrodt opened this issue 11 years ago • 20 comments

Would be good to have an option to disable multi-column sorting. That means, when you sort one column, all others should be reset to no sorting (currently this requires manual user interaction).

smehrbrodt avatar Mar 05 '15 07:03 smehrbrodt

I thought that's what it does by default, and you have to shift+click to get multi-column. Or do you mean when using the menus?

PaulL1 avatar Mar 05 '15 08:03 PaulL1

I was using the menus. Clicking the column headers doesn't do anything.

smehrbrodt avatar Mar 05 '15 08:03 smehrbrodt

In the tutorial? http://ui-grid.info/docs/#/tutorial/102_sorting? It works for me - what browser are you using?

PaulL1 avatar Mar 05 '15 08:03 PaulL1

Oh, it indeed works in Chromium (v40), but not in Firefox (v38) (both on Linux).

smehrbrodt avatar Mar 05 '15 08:03 smehrbrodt

It might perhaps work a bit better now - I did some work on the handlers, and if you had some touch handlers creeping in it previously could have been flakey.

PaulL1 avatar Mar 28 '15 20:03 PaulL1

Using Chrome 43.0.2357.124, external sorting via the menus adds to the sortCols array - I would also like an option to disable multi sort. Thanks

AdamDiament avatar Jun 22 '15 14:06 AdamDiament

I would also like an option to disable multi sort.

I am not referring to resetting the sort state by clicking a column header. I am specifically requesting the ability to disable multi-column sorting, so that there is one and only one sort column, and the sortPriority will not be displayed in the header.

don-p avatar Nov 18 '15 19:11 don-p

Yes please, I also need this feature.

mborca avatar Nov 24 '15 03:11 mborca

+1

pdemanget avatar Dec 03 '15 10:12 pdemanget

+1

jaredwilli avatar Dec 03 '15 16:12 jaredwilli

+1

radu-jakab avatar Jan 18 '16 10:01 radu-jakab

+1

Sarah4VT avatar Jan 27 '16 19:01 Sarah4VT

+1

spaceribs avatar Feb 11 '16 18:02 spaceribs

Instead of leaving +1 please add votes using the github ZenHub.io plugin. If you really want to see this feature please claim it. Come talk to us on gitter about how you want to implement it and then open a PR.

JLLeitschuh avatar Feb 11 '16 18:02 JLLeitschuh

style. .ui-grid-sort-priority-number{ font-size: 0 !important; }

PareshSolankiMI avatar Mar 02 '16 13:03 PareshSolankiMI

@PareshSolankiMI while that hides the functionality, it doesn't disable the ability to shift click multiple columns

spaceribs avatar Mar 02 '16 13:03 spaceribs

this one works for me.

gridApi.core.on.sortChanged( $scope, function(grid, sortColumns){ while(sortColumns.length >1){ sortColumns[0].unsort(); sortColumns.shift(); } });

lauwrentius avatar Mar 07 '16 03:03 lauwrentius

Agree, please include an option to disable and avoid manual interaction.

miguelchico avatar Mar 21 '16 12:03 miguelchico

Any news?

ATrogolo avatar Dec 05 '18 16:12 ATrogolo

Now we can use suppressMultiSort to disable it.

bee0060 avatar Apr 03 '19 09:04 bee0060