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

Card onClick() callback function signature. #949

Closed
supra28 opened this issue Nov 28, 2016 · 0 comments
Closed

Card onClick() callback function signature. #949

supra28 opened this issue Nov 28, 2016 · 0 comments

Comments

@supra28
Copy link

supra28 commented Nov 28, 2016

Hello
I am using the Card component inside map to render multiple cards.
What I want is to be able to click the card and go to a link using onClick (I use react-router with browser history)
onClick={this.handleItemClick}

in the function on handleItemClick how can I know what card is the function called from?
I have used Menu.Items before and I can get that info with the name prop by passing event and {name} together
handleItemClick = (e, { name }) => this.setState({ activeItem: name })

Is there any prop like name that i can pass here, I could not find it in the docs.
and I am sorry if this is not the right way to ask for help , I am very new to github.

Version

0.61.6

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

1 participant