Skip to content
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

Closable menu tabular / tab #2484

Closed
PurwadiPw opened this issue Feb 2, 2018 · 1 comment
Closed

Closable menu tabular / tab #2484

PurwadiPw opened this issue Feb 2, 2018 · 1 comment

Comments

@PurwadiPw
Copy link

<Menu tabular>
 {
  menus.map((menu, index) => (
   <Menu.Item 
    key={index} 
    name={menu.name} 
    active={this.props.location.pathname === menu.path} 
    onClick={() => {this.props.handleOpenClick(menu)}} 
   >
    {menu.name}
    <Button onClick={() => {this.props.handleCloseClick(index)}}>X</Button>
   </Menu.Item>
  ))
 }
</Menu>

I want to create a dynamic tabular layout with closable feature by using Menu and tabular option. I put the Button component inside a Menu.Item and implement the onClick event.
When the buton is clicked, it's also calling handleOpenClick() function on the Menu.Item component. I need to call the handleCloseClick() only.

Is there any suggestion ?
Sorry for my bad english

@levithomason
Copy link
Member

Please use the provided Gitter and StackOverflow links for help requests. The GitHub repo is focused strictly on bug fixes and feature development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants