Skip to content

Commit a27ad92

Browse files
authored
Fix Button compatibility with dcc.ConfirmDialogProvider (#773)
1 parent d9a503f commit a27ad92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/button/Button.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const Button = props => {
2929
class_name,
3030
color,
3131
outline,
32+
onClick,
3233
...otherProps
3334
} = props;
3435

@@ -41,7 +42,7 @@ const Button = props => {
4142
}
4243
};
4344
const useLink = href && !disabled;
44-
otherProps[useLink ? 'preOnClick' : 'onClick'] = incrementClicks;
45+
otherProps[useLink ? 'preOnClick' : 'onClick'] = onClick || incrementClicks;
4546

4647
return (
4748
<RBButton

0 commit comments

Comments
 (0)