Skip to content

Commit dcc1dda

Browse files
illiteratewriterTheSharpieOne
authored andcommitted
fix(UncontrolledCollapse): collapsing on mobile (reactstrap#1043)
fixed bug where uncontrolled collapse was not collapsing in mobile Closes reactstrap#1034
1 parent f5caf09 commit dcc1dda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/UncontrolledCollapse.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ class UncontrolledCollapse extends Component {
4242
}
4343
}
4444

45-
toggle() {
45+
toggle(e) {
4646
this.setState(({ isOpen }) => ({ isOpen: !isOpen }));
47+
e.preventDefault();
4748
}
4849

4950
render() {

0 commit comments

Comments
 (0)