fix: Update 'show more/less' tag button to prevent event propagation and improve event handling.

This commit is contained in:
pradeepkumar
2026-03-19 18:29:18 +05:30
parent b19991ed7b
commit 0caf7af45b

View File

@@ -118,12 +118,14 @@ function ProfessionalCard({
</span>
))}
{expertise.length > INITIAL_TAG_COUNT && (
<button
onClick={(e) => { e.preventDefault(); e.stopPropagation(); setShowAllTags(!showAllTags); }}
className="border-[0.7px] border-[#e58625] rounded-[15px] px-[5px] h-[24px] flex items-center justify-center font-serif font-normal text-[13px] leading-[100%] text-[#e58625] hover:bg-[#e58625]/10 transition-colors"
<span
role="button"
onClick={(e) => { e.preventDefault(); e.stopPropagation(); e.nativeEvent.stopImmediatePropagation(); setShowAllTags(prev => !prev); }}
onMouseDown={(e) => { e.preventDefault(); e.stopPropagation(); }}
className="border-[0.7px] border-[#e58625] rounded-[15px] px-[5px] h-[24px] flex items-center justify-center font-serif font-normal text-[13px] leading-[100%] text-[#e58625] hover:bg-[#e58625]/10 transition-colors cursor-pointer"
>
{showAllTags ? 'Show Less' : `+${expertise.length - INITIAL_TAG_COUNT} more`}
</button>
</span>
)}
</div>
</div>