Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to disable multi-column sorting #2913

Closed
smehrbrodt opened this issue Mar 5, 2015 · 20 comments · Fixed by #7163
Closed

Option to disable multi-column sorting #2913

smehrbrodt opened this issue Mar 5, 2015 · 20 comments · Fixed by #7163

Comments

@smehrbrodt
Copy link

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).

@PaulL1
Copy link
Contributor

PaulL1 commented Mar 5, 2015

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 PaulL1 added this to the 3.0 milestone Mar 5, 2015
@smehrbrodt
Copy link
Author

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

@PaulL1
Copy link
Contributor

PaulL1 commented Mar 5, 2015

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

@smehrbrodt
Copy link
Author

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

@PaulL1
Copy link
Contributor

PaulL1 commented Mar 28, 2015

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 PaulL1 modified the milestones: Future, 3.0 Mar 28, 2015
@AdamDiament
Copy link

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

@don-p
Copy link

don-p commented Nov 18, 2015

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.

@mborca
Copy link

mborca commented Nov 24, 2015

Yes please, I also need this feature.

@pdemanget
Copy link

+1

4 similar comments
@jaredwilli
Copy link

+1

@radu-jakab
Copy link

+1

@Sarah4VT
Copy link

+1

@spaceribs
Copy link

+1

@JLLeitschuh
Copy link
Contributor

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.

@PareshSolankiMI
Copy link

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

@spaceribs
Copy link

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

@lauwrentius
Copy link

this one works for me.

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

@miguelchico
Copy link

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

@ATrogolo
Copy link

ATrogolo commented Dec 5, 2018

Any news?

@bee0060
Copy link

bee0060 commented Apr 3, 2019

Now we can use suppressMultiSort to disable it.

mportuga pushed a commit that referenced this issue Aug 4, 2021
Adds a new grid option `suppressMultiSort`, which when ensures that when
you sort one column, all others should be reset to no sort (as long as
they don't have suppressRemoveSort set to true).

Closes: #2913
mportuga pushed a commit that referenced this issue Aug 4, 2021
Adds a new grid option `suppressMultiSort`, which when ensures that when
you sort one column, all others should be reset to no sort (as long as
they don't have suppressRemoveSort set to true).

Closes: #2913
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.