-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[Modal or Dialog]: Modal Background Overlap When Used in map() Without Unique id #44457
Labels
component: modal
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
Comments
Bittukr7479
added
the
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
label
Nov 18, 2024
Please provide a github or sandbox link that shows the problem, the description are very unclear |
sai6855
added
status: waiting for author
Issue with insufficient information
component: modal
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
and removed
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
labels
Nov 18, 2024
Exapmple code with UniqueID (alternative solution):
|
github-actions
bot
added
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
and removed
status: waiting for author
Issue with insufficient information
labels
Nov 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component: modal
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
Steps to reproduce
Current behavior
When using the Modal component inside a map() function without unique state or IDs:
Clicking the "Open Modal" button for any item in the list opens all modals in the map() simultaneously.
The Modal's backdrop (BackdropComponent) becomes darker or fully black, with each modal stacking a new backdrop.
This occurs regardless of whether only one modal is intended to open.
Expected behavior
Context
I am trying to render multiple modals dynamically using a map() function for a list of items. Each modal should work independently. However, the issue arises when:
Your environment
npx @mui/envinfo
Search keywords: Dialog Modal
The text was updated successfully, but these errors were encountered: