[WEB-1691] fix: update ControlLink default target to _blank to avoid unwanted N-progress trigger. (#4927)

This commit is contained in:
Prateek Shourya 2024-06-25 12:32:51 +05:30 committed by GitHub
parent 0ce17ff212
commit 981a8e93ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 5 additions and 9 deletions

View file

@ -11,7 +11,7 @@ export type TControlLink = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
};
export const ControlLink = React.forwardRef<HTMLAnchorElement, TControlLink>((props, ref) => {
const { href, onClick, children, target = "_self", disabled = false, className, draggable = false, ...rest } = props;
const { href, onClick, children, target = "_blank", disabled = false, className, draggable = false, ...rest } = props;
const LEFT_CLICK_EVENT_CODE = 0;
const handleOnClick = (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {