on-internet
← Community

How to implement dropdown menu in React JS using Material UI?

Stack Overflow ·

I have a dropdown which has a nested menu as shown below. The dropdown upon expanding shows two options: The problem is upon clicking any of the items the children options under Tenant Name or Dealer ID display for a second and disappear. How to solve this problem and next is how to store values which the user selects? My code is as follows: export default class DropDownMenuSimpleExample extends React.Component { constructor(props) { super(props); this.state = { dropDownData: [ { value: '', tenantName: '', dealerId: '', }, ], }; } handleChange = (event, index, value) => { this.setState({ value

Comments

Sign in or sign up to comment and upvote.

No comments yet.