mirror of
				https://github.com/lingble/twenty.git
				synced 2025-10-30 20:27:55 +00: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:
		| @@ -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} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Divyesh Patel
					Divyesh Patel