Skip to content

Commit

Permalink
fix: fix ToggleButton value change with ToggleButton.Group (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
usrbowe authored and satya164 committed Feb 4, 2019
1 parent c552f00 commit 852ed3e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/ToggleButton/ToggleButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class ToggleButton extends React.Component<Props> {
style,
value,
status,
onPress,
...rest
} = this.props;
const borderRadius = theme.roundness;
Expand All @@ -125,9 +126,9 @@ class ToggleButton extends React.Component<Props> {
<IconButton
borderless={false}
icon={icon}
onPress={() => {
if (this.props.onPress) {
this.props.onPress(status);
onPress={(e) => {
if (onPress) {
onPress(e);
}

if (context) {
Expand Down

0 comments on commit 852ed3e

Please sign in to comment.