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] filterPanel does not persist column name order #14783

Closed
Aberkati opened this issue Oct 1, 2024 · 8 comments
Closed

[data grid] filterPanel does not persist column name order #14783

Aberkati opened this issue Oct 1, 2024 · 8 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! customization: extend Logic customizability feature: Filtering Related to the data grid Filtering feature support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/

Comments

@Aberkati
Copy link

Aberkati commented Oct 1, 2024

Steps to reproduce

Link to live example: (required) : https://stackblitz.com/edit/react-5jot7j-clme3z?file=Demo.js

Steps:

  1. Try to show filter panel name, you will have a ordered list like this :

image

  1. Choose some filter and apply it like this 👍

image

  1. Now reopen filterPanel and you will get unordered list

image

Current behavior

When I try to apply a filter I get an ordered list, but when I apply one and try again it doesnt work

Expected behavior

No response

Context

No response

Your environment

System:
OS: Windows 10 10.0.19045
Binaries:
Node: 18.18.1 - C:\Program Files\nodejs\node.EXE
npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
pnpm: Not Found
Browsers:
Chrome: Not Found
Edge: Chromium (128.0.2739.79)
npmPackages:
@emotion/react: ^11.10.6 => 11.11.1
@emotion/styled: ^11.10.6 => 11.11.0
@mui/base: 5.0.0-beta.7
@mui/core-downloads-tracker: 5.14.0
@mui/icons-material: ^5.11.16 => 5.14.0
@mui/material: ^5.12.1 => 5.14.0
@mui/private-theming: 5.13.7
@mui/styled-engine: 5.13.2
@mui/system: 5.14.0
@mui/types: 7.2.4
@mui/utils: 5.15.14
@mui/x-data-grid: 6.20.0
@mui/x-data-grid-premium: 6.20.0 => 6.20.0
@mui/x-data-grid-pro: 6.20.0
@mui/x-license-pro: ^6.10.0 => 6.10.2
@types/react: 17.0.75
react: ^18.2.0 => 18.2.0
react-dom: ^18.2.0 => 18.2.0
typescript: 5.6.2

Search keywords: PremiumDataGrid
Order ID: 66242

@Aberkati Aberkati added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 1, 2024
@Aberkati Aberkati changed the title PremiumDataGrid filterPanel not persist column'n name order PremiumDataGrid filterPanel not persist column's name order Oct 1, 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 1, 2024
@michelengelen
Copy link
Member

Hey @Aberkati ... your example works for me ...

Screen.Recording.2024-10-01.at.16.34.43.mov

Could you check if there is something very specific you have to do in order to trigger this?

@michelengelen michelengelen added feature: Filtering Related to the data grid Filtering feature status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 1, 2024
@michelengelen michelengelen changed the title PremiumDataGrid filterPanel not persist column's name order [data grid] filterPanel not persist column's name order Oct 1, 2024
@michelengelen michelengelen changed the title [data grid] filterPanel not persist column's name order [data grid] filterPanel does not persist column name order Oct 1, 2024
@Aberkati
Copy link
Author

Aberkati commented Oct 1, 2024

Please take a look here, the list's order change when I apply a filter

Media1.mp4

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Oct 1, 2024
@michelengelen
Copy link
Member

I get that, but when I do the exact same steps as you did I do not get unordered columns names.

Screen.Recording.2024-10-01.at.17.09.25.mov

That's why I am trying to investigate on your end.
Could you try this in a different browser? Ideally also in private mode?
Also, if possible, on a different OS?

@michelengelen michelengelen added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 1, 2024
@Aberkati
Copy link
Author

Aberkati commented Oct 2, 2024

Thank you for your quick reply, also in a private mode and different browser it not work..

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Oct 2, 2024
@michelengelen
Copy link
Member

@mui/xgrid could someone else test this as well? I did test this with:

  System:
    OS: macOS 14.6.1
  Binaries:
    Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm
    pnpm: 9.11.0 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 129.0.6668.89
    Safari: 17.6
    FireFox: 130.0.1

@cherniavskii
Copy link
Member

I can reproduce the issue.

@Aberkati I can see that you're using a custom filter panel, but the GridFilterPanel component doesn't accept the columns prop.
If you want to sort the columns in the filter panel, I recommend following the Customize the filter panel content guide and using columnsSort.
Here is a working demo: https://stackblitz.com/edit/react-5jot7j-dylxrw?file=Demo.js

Is this what you're looking for?

@cherniavskii cherniavskii added status: waiting for author Issue with insufficient information customization: extend Logic customizability and removed bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 2, 2024
@Aberkati
Copy link
Author

Aberkati commented Oct 2, 2024

it Work's like a charm ! thank you @cherniavskii

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Oct 2, 2024
@Aberkati Aberkati closed this as completed Oct 2, 2024
Copy link

github-actions bot commented Oct 2, 2024

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

We value your feedback @Aberkati! How was your experience with our support team?
We'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!

@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 2, 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: Filtering Related to the data grid Filtering feature support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/
Projects
None yet
Development

No branches or pull requests

3 participants