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

[material-ui][Snackbar] Allow positioning relative to container instead of the screen #40495

Closed
1 task done
Janpot opened this issue Jan 9, 2024 · 3 comments
Closed
1 task done
Labels
component: snackbar This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material

Comments

@Janpot
Copy link
Member

Janpot commented Jan 9, 2024

Duplicates

  • I have searched the existing issues

Summary

Would like to be able to show CRUD notifications locally to a DataGrid. (e.g. "row created successfully", "update failed with error X",...). Would like to show it in the context of the grid rather than globally on the screen. Any way MUI could support something similar to anchorEl in the Popper component, but for the snackbar specifically?

Examples

No response

Motivation

Toolpad

Search keywords:

@Janpot Janpot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 9, 2024
@zannager zannager added the component: snackbar This is the name of the generic UI component, not the React module! label Jan 9, 2024
@danilo-leal danilo-leal changed the title [SnackBar] Allow positioning the SnackBar relative to container instead of screen [material-ui][Snackbar] Allow positioning relative to container instead of the screen Jan 9, 2024
@danilo-leal danilo-leal added the package: material-ui Specific to @mui/material label Jan 9, 2024
@ZeeshanTamboli
Copy link
Member

ZeeshanTamboli commented Jan 13, 2024

Could you attempt to override the Snackbar's position value to absolute and adding position: relative to the DataGrid, as suggested here? Does that work?

@ZeeshanTamboli ZeeshanTamboli removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 13, 2024
@Janpot
Copy link
Member Author

Janpot commented Jan 14, 2024

Yes, that works. Is this worth an official API or example in the docs?

@ZeeshanTamboli
Copy link
Member

ZeeshanTamboli commented Jan 15, 2024

Is this worth an official API or example in the docs?

Well, I don't think so because there hasn't been any request for this before, indicating that people are customizing it as above.

@Janpot Janpot closed this as completed Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: snackbar This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material
Projects
None yet
Development

No branches or pull requests

5 participants