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] Header Filters overlap with data in compact density #14072

Closed
lukedukeus opened this issue Aug 1, 2024 · 4 comments
Closed

[data grid] Header Filters overlap with data in compact density #14072

lukedukeus opened this issue Aug 1, 2024 · 4 comments
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists feature: Filtering on header Related to the header filtering (Pro) feature

Comments

@lukedukeus
Copy link

lukedukeus commented Aug 1, 2024

Steps to reproduce

Link to live example

Steps:

  1. Type in a header filter
  2. See how it overlaps:
    image

Current behavior

Currently, the textbox's filter label overlaps with the column header, and the bottom of the textbox overlaps with the datagrid rows.

Expected behavior

I would expect the header filters to be <TextInput size='small' /> when the density is compact

Context

No response

Your environment

npx @mui/envinfo
  System:
    OS: Windows 11 10.0.22631
  Binaries:
    Node: 20.15.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: Not Found
  Browsers:
    Chrome: Not Found
    Edge: Chromium (127.0.2651.74)
  npmPackages:
    @emotion/react: ^11.11.0 => 11.11.4
    @emotion/styled: ^11.11.0 => 11.11.5
    @mui/base:  5.0.0-beta.40
    @mui/core-downloads-tracker:  5.16.6
    @mui/icons-material: ^5.16.6 => 5.16.6
    @mui/lab: ^5.0.0-alpha.173 => 5.0.0-alpha.173
    @mui/material: ^5.16.6 => 5.16.6
    @mui/private-theming:  5.16.6
    @mui/styled-engine:  5.16.6
    @mui/system: ^5.16.6 => 5.16.6
    @mui/types:  7.2.15
    @mui/utils:  5.16.6
    @mui/x-data-grid: ^7.11.1 => 7.11.1
    @mui/x-data-grid-premium: ^7.11.1 => 7.11.1
    @mui/x-data-grid-pro:  7.11.1
    @mui/x-date-pickers:  7.11.1
    @mui/x-date-pickers-pro: ^7.11.1 => 7.11.1
    @mui/x-internals:  7.11.1
    @mui/x-license: ^7.11.1 => 7.11.1
    @mui/x-tree-view: ^7.11.1 => 7.11.1
    @types/react: ^18.0.28 => 18.2.74
    react: ^18.2.0 => 18.2.0
    react-dom: ^18.2.0 => 18.2.0
    typescript: ^5.0.4 => 5.4.3

Search keywords: headerFilters density

Search keywords:

@lukedukeus lukedukeus added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Aug 1, 2024
@lukedukeus
Copy link
Author

Found a workaround - you can manually set the header filter height. Not sure if this is a bug, but it would be cool if it defaulted to a height based on the density without setting it manually.

For now, what I am doing:

<DataGridPremium
      headerFilters
      density={density}
      headerFilterHeight={density=== 'compact' ? 75 : 45}
/>

@zannager zannager transferred this issue from mui/material-ui Aug 1, 2024
@zannager zannager added the component: data grid This is the name of the generic UI component, not the React module! label Aug 1, 2024
@michelengelen michelengelen added bug 🐛 Something doesn't work feature: Filtering on header Related to the header filtering (Pro) feature labels Aug 2, 2024
@michelengelen michelengelen changed the title Header Filters overlap with data in compact density [data grid] Header Filters overlap with data in compact density Aug 2, 2024
@michelengelen
Copy link
Member

Hey @lukedukeus ... that's a nice workaroud. There is an issue already about this, so I'll close this as a duplicate! Thanks for raising it and sharing your workaround!

@michelengelen
Copy link
Member

Closing as duplicate of #13048

@michelengelen michelengelen closed this as not planned Won't fix, can't repro, duplicate, stale Aug 2, 2024
@michelengelen michelengelen added duplicate This issue or pull request already exists and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 2, 2024
Copy link

github-actions bot commented Aug 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.

@lukedukeus: 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.

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! duplicate This issue or pull request already exists feature: Filtering on header Related to the header filtering (Pro) feature
Projects
None yet
Development

No branches or pull requests

3 participants