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] Filter panel breaks layout on small display #5183

Closed
2 tasks done
bruceharrison1984 opened this issue Jun 12, 2022 · 8 comments · Fixed by #12799
Closed
2 tasks done

[data grid] Filter panel breaks layout on small display #5183

bruceharrison1984 opened this issue Jun 12, 2022 · 8 comments · Fixed by #12799
Assignees
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! design This is about UI or UX design, please involve a designer feature: Filtering Related to the data grid Filtering feature

Comments

@bruceharrison1984
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Opening the filter panel on a small display breaks the layout on the X axis.

Screenshot_20220612-160534

Expected behavior 🤔

I'd expect the filter panel to honor the page layout and not break out beyond the expected page bounds.

Steps to reproduce 🕹

Steps:

  1. Open filter panel on a mobile device, when the DataFrid is assigned full width.

Context 🔦

No response

Your environment 🌎

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Order ID 💳 (optional)

No response

@bruceharrison1984 bruceharrison1984 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 12, 2022
@bruceharrison1984 bruceharrison1984 changed the title DataFrid Filter panel breaks layout on small display DataGrid Filter panel breaks layout on small display Jun 12, 2022
@alexfauquette
Copy link
Member

A workaround could be to limit the width of the panel:

componentsProps={{ filterPanel: { sx: { maxWidth: "100vw" } } }}

https://codesandbox.io/s/datagriddemo-demo-mui-x-forked-4t90kx?file=/demo.tsx

I don't see a good behavior for the filter panel on small screen

@alexfauquette alexfauquette added bug 🐛 Something doesn't work design: ux and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jun 13, 2022
@bruceharrison1984
Copy link
Author

@alexfauquette Thanks for the workaround, this'll get me unstuck at least in the near-term. I agree that the current panel layout won't gracefully perform on a smaller screen, and it'd likely need to be reflowed in a more vertical-centric way in order to improve UX.

Thanks 👍

@flaviendelangle
Copy link
Member

I think that could be a good topic to discuss with @gerdadesign

@flaviendelangle flaviendelangle changed the title DataGrid Filter panel breaks layout on small display [data grid] Filter panel breaks layout on small display Jun 14, 2022
@flaviendelangle flaviendelangle added the feature: Filtering Related to the data grid Filtering feature label Jun 14, 2022
@gerdadesign
Copy link
Member

Should these elements stack vertically past a certain breakpoint? (Do we have existing breakpoints already defined?)

@alexfauquette
Copy link
Member

Mo, for now, the sizes are fixed except for the "value" input which can be customized by dev. The filter panel itself only have a min width

@flaviendelangle flaviendelangle added the component: data grid This is the name of the generic UI component, not the React module! label Oct 17, 2022
@jacobcarrington
Copy link

Surprised to see this is still an issue in version 6. My work around as it effects all DataGrids is to update the theme defaultProps.

const theme: ThemeOptions = {
 ...
  components: {
    MuiDataGrid: {
      defaultProps: {
        slotProps: {
          panel: {
            sx: {
              "& .MuiDataGrid-panelWrapper": {
                maxWidth: "calc(100vw - 4rem)",
              },
            },
          },
        },
      },
    },
  },
};

@cherniavskii
Copy link
Member

We can adopt this workaround in the data grid since it's better than the current behavior anyway 👍

@cherniavskii cherniavskii moved this from 🆕 Needs refinement to 🔖 Ready in MUI X Data Grid Aug 1, 2023
@oliviertassinari oliviertassinari added design This is about UI or UX design, please involve a designer and removed design: ux labels Aug 18, 2023
@cherniavskii cherniavskii self-assigned this Feb 27, 2024
Copy link

⚠️ 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.

@bruceharrison1984: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

@cherniavskii cherniavskii moved this from 🔖 Ready to ✅ Done in MUI X Data Grid Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! design This is about UI or UX design, please involve a designer feature: Filtering Related to the data grid Filtering feature
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

8 participants