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