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

ghost picture ghost  路  3Comments

TimoRuetten picture TimoRuetten  路  3Comments

iamzhouyi picture iamzhouyi  路  3Comments

finaiized picture finaiized  路  3Comments

sys13 picture sys13  路  3Comments