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] Add "No columns" overlay #16543

Merged
merged 11 commits into from
Feb 12, 2025
Merged

Conversation

KenanYusuf
Copy link
Member

@KenanYusuf KenanYusuf commented Feb 11, 2025

Closes #14396 and #14395

https://deploy-preview-16543--material-ui-x.netlify.app/x/react-data-grid/overlays/#no-columns-overlay

No columns

<DataGrid columns={[]} />

localhost_3001_playground_

No visible columns

Screenshot 2025-02-11 at 16 14 26

localhost_3001_playground_ (2)

Changelog

Breaking changes

  • The main--hasSkeletonLoadingOverlay class has been renamed to main--hiddenContent and is now also applied when the "No columns" overlay is displayed.

@KenanYusuf KenanYusuf added component: data grid This is the name of the generic UI component, not the React module! feature: Column visibility design This is about UI or UX design, please involve a designer labels Feb 11, 2025
@mui-bot
Copy link

mui-bot commented Feb 11, 2025

Localization writing tips ✍️

Seems you are updating localization 🌍 files.

Thank you for contributing to the localization! 🎉 To make your PR perfect, here is a list of elements to check: ✔️

  • Verify if the PR title respects the release format. Here are two examples (depending if you update or add a locale file)

    [l10n] Improve Swedish (sv-SE) locale
    [l10n] Add Danish (da-DK) locale

  • Update the documentation of supported locales by running pnpm l10n
  • Clean files with pnpm prettier.

Deploy preview: https://deploy-preview-16543--material-ui-x.netlify.app/

Updated pages:

Generated by 🚫 dangerJS against d0764c6

@KenanYusuf KenanYusuf marked this pull request as ready for review February 12, 2025 09:01
@KenanYusuf KenanYusuf requested a review from a team February 12, 2025 09:02
@@ -466,6 +467,7 @@ export const useGridColumnHeaders = (props: UseGridColumnHeadersProps) => {
role="row"
aria-rowindex={depth + 1}
ownerState={rootProps}
style={{ height: groupHeaderHeight }}
Copy link
Member Author

@KenanYusuf KenanYusuf Feb 12, 2025

Choose a reason for hiding this comment

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

Not sure whether this could be classified as a breaking change or not. The height of the headers are applied to the header rows rather than header cells so that it does not collapse when there are no cells in it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would say no, since it is a direct style and not class move
otherwise we would not be able to change anything

@@ -466,6 +467,7 @@ export const useGridColumnHeaders = (props: UseGridColumnHeadersProps) => {
role="row"
aria-rowindex={depth + 1}
ownerState={rootProps}
style={{ height: groupHeaderHeight }}
Copy link
Contributor

Choose a reason for hiding this comment

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

I would say no, since it is a direct style and not class move
otherwise we would not be able to change anything

KenanYusuf and others added 2 commits February 12, 2025 09:57
Co-authored-by: Armin Mehinovic <4390250+arminmeh@users.noreply.github.com>
Signed-off-by: Kenan Yusuf <kenan.m.yusuf@gmail.com>
@KenanYusuf KenanYusuf mentioned this pull request Feb 12, 2025
15 tasks
@KenanYusuf KenanYusuf merged commit 9b36487 into mui:master Feb 12, 2025
18 checks passed
@KenanYusuf KenanYusuf deleted the no-columns-overlay branch February 12, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change 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: Column visibility v8.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] Add "no visible columns" overlay
3 participants