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

[DataGrid] Starting v5.3.0 till latest version components ErrorOverlay gets wrapped into div with 0px x 0px size #4026

Closed
2 tasks done
IngusSkaistkalns opened this issue Feb 24, 2022 · 4 comments · Fixed by #3832
Assignees
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Rendering layout Related to the data grid Rendering engine

Comments

@IngusSkaistkalns
Copy link

IngusSkaistkalns commented Feb 24, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

<DataGrid
  ...
  components={{
    ErrorOverlay: ({ graphQLErrors, clientErrors, networkError, message }) => (
        <div style={{ background: 'red' }}>Long custom error message to display</div>
    )
  }}
/>

will result error component wrapped in additional div with undesired styling overflow: visible; width: 0px;

image
image

Expected behavior 🤔

In version 5.2.2 this wrapped div does not appear:

<DataGrid
  ...
  components={{
    ErrorOverlay: ({ graphQLErrors, clientErrors, networkError, message }) => (
        <div style={{ background: 'red' }}>Long custom error message to display</div>
    )
  }}
/>

does not have that wrapped div with styling that limits size of ErrorOverlay

image

image

Steps to reproduce 🕹

Codesandbox - https://codesandbox.io/s/customemptyoverlaygrid-material-demo-forked-e1uww3?file=/demo.tsx

Steps:

Not sure if there anything other than defining custom ErrorOverlay between v5.2.2 and up....

Context 🔦

Custom error message component/overlay

Your environment 🌎

Not sure if this is environment specific issue.

Order ID 💳 (optional)

No response

@IngusSkaistkalns IngusSkaistkalns added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 24, 2022
@IngusSkaistkalns
Copy link
Author

I also went though CHANGELOG and could not find anything that could lead to such behaviour as desired.

@IngusSkaistkalns IngusSkaistkalns changed the title Starting v5.3.0 till latest version components ErrorOverlay gets wrapped into div with 0px x 0px size [DataGrid] Starting v5.3.0 till latest version components ErrorOverlay gets wrapped into div with 0px x 0px size Feb 24, 2022
@flaviendelangle
Copy link
Member

I think #3832 should solve this issue (@cherniavskii)

@cherniavskii
Copy link
Member

cherniavskii commented Feb 24, 2022

I've updated the issue with a link to Codesandbox.

As a workaround, you can use GridOverlay for now: https://codesandbox.io/s/customemptyoverlaygrid-material-demo-forked-6espse?file=/demo.tsx
After #3832 is released, it won't be necessary.

Also, this issue opened a discussion on few more changes in ErrorOverlay - see #3832 (comment)

@cherniavskii cherniavskii self-assigned this Feb 24, 2022
@cherniavskii cherniavskii added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Rendering layout Related to the data grid Rendering engine and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 24, 2022
@cherniavskii
Copy link
Member

Fixed by #3832

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! feature: Rendering layout Related to the data grid Rendering engine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants