Problem description
@davincho @oliviertassinari #4850
I found a bug in ListItem component.
set second item's props open = true, then click it to hide the third one. When hover the first ListItem, the second will reopen automatically;
I have read the source code and I found in line 421, handleMouseEnter will setState to change backgroundColor, but it will make child ListItem's componentWillReceiveProps setState according to it props in line 313
working code that reproduces the issue is
<List style={styles.menuStyle}>
<ListItem
open
primaryText="1"
primaryTogglesNestedList
nestedItems={[
<ListItem
open
primaryText="2"
primaryTogglesNestedList
nestedItems={[
<ListItem
primaryText="3"
/>,
]}
/>,
]}
/>
</List>
Versions
- Material-UI:^0.16.1
- React:^15.2.1
- Browser: chrome 53
Problem description
@davincho @oliviertassinari #4850
I found a bug in ListItem component.
set second item's props open = true, then click it to hide the third one. When hover the first ListItem, the second will reopen automatically;
I have read the source code and I found in line 421, handleMouseEnter will setState to change backgroundColor, but it will make child ListItem's componentWillReceiveProps setState according to it props in line 313
working code that reproduces the issue is
Versions