-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
onClick event for Simple Panel with header ? #466
Comments
The |
Does this help you accomplish what you needed? |
From what I gather from the code, the handleSelect() function is used only if the panel is declared as collapsable. What I actually want to do is to render a component when my Panel with heading is clicked. I was thinking of editing the /src/Panel.js file to add an onClick handler on the Panel's wrapper div and rebuilding the module. |
You already can do what you need because of that https://github.com/AlexKVal/react-bootstrap/blob/ccc50e01917ba75e5a983ba068c1db4b790bb85d/src/Panel.js#L58 Just try to copy / past this code into code-editor under a const panelInstance = (
<Panel onClick={()=>alert('It works')}>
Basic panel example
</Panel>
);
React.render(panelInstance, mountNode); 🍒 Does it help you ? |
…eact-bootstrap#466) Since @ad1992 is doing is a stellar job!
Is it any way to fire an event when a simple Panel is clicked by the user ?
The text was updated successfully, but these errors were encountered: