fix LinkButton to prevent default
This commit is contained in:
committed by
Bill Thornton
parent
07fe5adc1c
commit
32f835c865
@@ -20,6 +20,7 @@ const LinkButton: React.FC<LinkButtonProps> = ({
|
||||
isAutoHideEnabled,
|
||||
href,
|
||||
target,
|
||||
onClick,
|
||||
children,
|
||||
...rest
|
||||
}) => {
|
||||
@@ -41,7 +42,8 @@ const LinkButton: React.FC<LinkButtonProps> = ({
|
||||
} else {
|
||||
e.preventDefault();
|
||||
}
|
||||
}, [ href, target ]);
|
||||
onClick?.(e);
|
||||
}, [ href, target, onClick ]);
|
||||
|
||||
if (isAutoHideEnabled === true && !appHost.supports('externallinks')) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user