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

[data grid] Support sorting on the checkboxSelection column #14952

Open
xfsnowind opened this issue Oct 14, 2024 · 1 comment
Open

[data grid] Support sorting on the checkboxSelection column #14952

xfsnowind opened this issue Oct 14, 2024 · 1 comment
Labels
component: data grid This is the name of the generic UI component, not the React module! customization: extend Logic customizability feature: Sorting Related to the data grid Sorting feature support: commercial Support request from paid users support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/ waiting for 👍 Waiting for upvotes

Comments

@xfsnowind
Copy link

xfsnowind commented Oct 14, 2024

The problem in depth

Hi,

Currently, the checkbox column does not support sort feature, which would make it easy for user to check the selected/unselected items.

I know it can be achieved by change the constant value GRID_CHECKBOX_SELECTION_COL_DEF

const GRID_CHECKBOX_SELECTION_COL_DEF_SORTABLE = {
  ...GRID_CHECKBOX_SELECTION_COL_DEF,
  sortable: true,
}

But then

  1. the checkbox column width would be too wide with the sort icon
  2. I assume this is more like a standard feature, data-grid lib should support it instead of being customized by user

So is it possible to have such a feature in the certain new release with a good UX design?

Your environment

`npx @mui/envinfo`
System:
    OS: macOS 15.0.1
  Binaries:
    Node: 22.9.0 - ~/.nvm/versions/node/v22.9.0/bin/node
    npm: 10.8.3 - ~/.nvm/versions/node/v22.9.0/bin/npm
    pnpm: 9.9.0 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 129.0.6668.91
    Edge: 126.0.2592.81
    Safari: 18.0.1
  npmPackages:
    @emotion/react: 11.11.4 => 11.11.4
    @emotion/styled: 11.11.5 => 11.11.5
    @mui/icons-material: 6.1.1 => 6.1.1
    @mui/lab: 6.0.0-beta.10 => 6.0.0-beta.10
    @mui/material: 6.1.1 => 6.1.1
    @mui/system: 6.1.1 => 6.1.1
    @mui/types: 7.2.17 => 7.2.17
    @mui/x-data-grid: 7.16.0 => 7.16.0
    @mui/x-data-grid-generator: 7.16.0 => 7.16.0
    @mui/x-data-grid-premium: 7.16.0 => 7.16.0
    @mui/x-data-grid-pro: 7.16.0 => 7.16.0
    @mui/x-date-pickers: 7.16.0 => 7.16.0
    @mui/x-date-pickers-pro: 7.16.0 => 7.16.0
    @mui/x-license: 7.16.0 => 7.16.0
    @mui/x-tree-view: 6.17.0 => 6.17.0
    @types/react: 18.3.2 => 18.3.2
    react: 18.3.1 => 18.3.1
    react-dom: 18.3.1 => 18.3.1
    styled-components: 5.3.5 => 5.3.5
    typescript: 5.6.2 => 5.6.2

Search keywords: Checkbox sortable
Order ID: 79531

@xfsnowind xfsnowind added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users labels Oct 14, 2024
@github-actions github-actions bot added component: data grid This is the name of the generic UI component, not the React module! support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/ labels Oct 14, 2024
@cherniavskii cherniavskii added waiting for 👍 Waiting for upvotes feature: Sorting Related to the data grid Sorting feature customization: extend Logic customizability labels Oct 14, 2024
@MBilalShafi MBilalShafi removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 14, 2024
@MBilalShafi
Copy link
Member

Thanks @xfsnowind for the feature request. It makes sense to have been supported by the Data Grid internally. It's open for upvotes to check the demand in the community for us to prioritize it accordingly.
Feel free to upvote the issue description.

@MBilalShafi MBilalShafi changed the title [question] enable sortable for data-grid's checkbox column [data grid] Support sorting on the checkboxSelection column Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! customization: extend Logic customizability feature: Sorting Related to the data grid Sorting feature support: commercial Support request from paid users support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/ waiting for 👍 Waiting for upvotes
Projects
Status: 🆕 Needs refinement
Development

No branches or pull requests

3 participants