Skip to content

Commit 9c78cb6

Browse files
committed
Fix regression
1 parent de64674 commit 9c78cb6

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/components/button/Button.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ function Button({
3030
className,
3131
rel,
3232
setProps,
33+
// onClick prop needs to be overridable for dcc.ConfirmDialog
34+
// eslint-disable-next-line react/prop-types
35+
onClick,
3336
...otherProps
3437
}) {
3538
const incrementClicks = () => {
@@ -38,7 +41,7 @@ function Button({
3841
}
3942
};
4043
const useLink = href && !disabled;
41-
otherProps[useLink ? 'preOnClick' : 'onClick'] = incrementClicks;
44+
otherProps[useLink ? 'preOnClick' : 'onClick'] = onClick || incrementClicks;
4245

4346
if (useLink) {
4447
// react-bootstrap strips out target prop if tag isn't an anchor element,

uv.lock

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)