Material-ui: MenuItem lose context when it renders through a loop

Created on 28 Feb 2018  路  3Comments  路  Source: mui-org/material-ui

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

It should render the menuItems with the correct data.

Current Behavior

It render the menuItems with the last data.

Steps to Reproduce (for bugs)

https://codesandbox.io/s/pj02yj0jlx

Context

I want to create several MenuItems with the correct data that is inside an array.

Your Environment

| Tech | Version |
|--------------|---------|
| Material-UI | 1 |
| React | 16.2.0 |
| browser | Chrome |

question

Most helpful comment

All 3 comments

@AlgusDark Your are opening the three menus at the same time. From what I can understand, you only when to open one at the time.

I see, that's why. Thanks @oliviertassinari

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mb-copart picture mb-copart  路  3Comments

anthony-dandrea picture anthony-dandrea  路  3Comments

pola88 picture pola88  路  3Comments

revskill10 picture revskill10  路  3Comments

newoga picture newoga  路  3Comments