mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
fix(CustomerDrawerLink): prevent the default JS behaivour.
This commit is contained in:
@@ -8,16 +8,22 @@ function CustomerDrawerLinkComponent({
|
||||
// #ownProps
|
||||
children,
|
||||
customerId,
|
||||
className,
|
||||
|
||||
// #withDrawerActions
|
||||
openDrawer,
|
||||
}) {
|
||||
// Handle view customer drawer.
|
||||
const handleCustomerDrawer = () => {
|
||||
const handleCustomerDrawer = (event) => {
|
||||
openDrawer('customer-details-drawer', { customerId });
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
return <ButtonLink onClick={handleCustomerDrawer}>{children}</ButtonLink>;
|
||||
return (
|
||||
<ButtonLink className={className} onClick={handleCustomerDrawer}>
|
||||
{children}
|
||||
</ButtonLink>
|
||||
);
|
||||
}
|
||||
|
||||
export const CustomerDrawerLink = R.compose(withDrawerActions)(
|
||||
|
||||
Reference in New Issue
Block a user