Hey Am using React select Custom component and In the dropdown Option am Adding 2 icons,and i want to add the onClick Event on that, the Problem is when i click the icon, the default onClick also get called and the default action also get executed in the background.
export const SvdSrchSelectOpt = (props : any) =>
{
return (
<components.Option {...props} >
<Styld.Div >
<div className="flex-auto w-full">{props.label}</div>
<div className="container flex ml-auto justify-end">
<Button variant='noBorder' onClick={props.onEdit} icon="writing-editing" className='max-w-35p justify-items-center'>
</Button>
<Button variant='noBorder' onClick={props.onDelete} icon="TrashMessaging" className='max-w-35p justify-items-center'>
</Button>
</div>
</Styld.Div>
</components.Option >
);
};
i want if user Click on the Label then default onClick get execute but if user click on any of these icon then icon's Onclick get execute. Please help me in this Thanks In Advance