mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-28 14:52:28 +03:00
fix: Company picker opening when it shouldn't (#7023)
### The Company Picker opens when it shouldn't. Fixes #6989 ### Video https://github.com/user-attachments/assets/a1e56418-8409-46e8-879a-d8335593ea28
This commit is contained in:
parent
03fa5913d8
commit
3d9620a98c
@ -4,6 +4,7 @@ import { getLinkToShowPage } from '@/object-metadata/utils/getLinkToShowPage';
|
||||
import { useRecordChipData } from '@/object-record/hooks/useRecordChipData';
|
||||
import { ObjectRecord } from '@/object-record/types/ObjectRecord';
|
||||
import { UndecoratedLink } from '@/ui/navigation/link/components/UndecoratedLink';
|
||||
import { MouseEvent } from 'react';
|
||||
|
||||
export type RecordChipProps = {
|
||||
objectNameSingular: string;
|
||||
@ -23,8 +24,15 @@ export const RecordChip = ({
|
||||
record,
|
||||
});
|
||||
|
||||
const handleClick = (e: MouseEvent<HTMLAnchorElement>) => {
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
return (
|
||||
<UndecoratedLink to={getLinkToShowPage(objectNameSingular, record)}>
|
||||
<UndecoratedLink
|
||||
onClick={handleClick}
|
||||
to={getLinkToShowPage(objectNameSingular, record)}
|
||||
>
|
||||
<AvatarChip
|
||||
placeholderColorSeed={record.id}
|
||||
name={recordChipData.name}
|
||||
|
Loading…
Reference in New Issue
Block a user