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

feat(react-grid): cancel sorting by using the Ctrl key #96

Merged

Conversation

SergeyAlexeev
Copy link
Contributor

No description provided.

@@ -18,7 +18,7 @@ export const GroupPanelCell = ({
<span
onClick={(e) => {
if (!allowSorting) return;
changeSortingDirection({ keepOther: e.shiftKey });
changeSortingDirection({ keepOther: e.shiftKey || e.ctrlKey, remove: e.ctrlKey });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ctrl + Click is used in Windows and Linux. On macOS, the following keyboard shortcut is used: CMD + Click

Copy link
Contributor

@viterobk viterobk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to rename the parameter that cancels sorting by a column from "remove" to "cancel" or "clear".

@SergeyAlexeev SergeyAlexeev merged commit 0d804f4 into DevExpress:master May 24, 2017
@SergeyAlexeev SergeyAlexeev deleted the cancel-sorting-via-ctrl branch May 24, 2017 12:40
@BesyadaV
Copy link

@SergeyAlexeev can you give some example with cancel sorting on some column?

@SergeyAlexeev
Copy link
Contributor Author

@UaSensei take a look at this guide. The first sample on this page shows the functionality you described:

Click several columns while holding Shift to sort data by these columns. Clicking a column while holding Ctrl (Cmd for MacOS) stops sorting by this column.

@BesyadaV
Copy link

BesyadaV commented Sep 26, 2017

@SergeyAlexeev sorry my fail, bad described. I mean to disable sort on column(user cann`t click on this column header). For example i have 'ID','Name'... i want to have possibility sort by 'Name', but disabled sort by 'ID'

@SergeyAlexeev
Copy link
Contributor Author

@UaSensei thank you for the clarification. I've created the related issue.

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

Successfully merging this pull request may close these issues.

6 participants