Skip to content

Commit

Permalink
fix(Chip): remove tabIndex from action button
Browse files Browse the repository at this point in the history
It is already set on IconButton

refs: CDS-15
  • Loading branch information
beawar authored and Beatrice Guerra committed Mar 28, 2022
1 parent 8770b92 commit c2e7c30
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/components/display/Chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,10 @@ const Chip = React.forwardRef<HTMLDivElement, ChipProps>(function ChipFn(
</Tooltip>
);
} else if (action.type === 'button') {
const clickHandler: React.ReactEventHandler | undefined = action.onClick
? (event): void => {
event.preventDefault();
action.onClick(event);
}
: undefined;
const clickHandler: React.ReactEventHandler = (event): void => {
event.preventDefault();
action.onClick(event);
};
item = (
<Tooltip
key={action.id}
Expand All @@ -304,7 +302,6 @@ const Chip = React.forwardRef<HTMLDivElement, ChipProps>(function ChipFn(
iconSize: SIZES[size].icon,
paddingSize: 0 // padding set through styled component
}}
tabIndex={index}
/>
</ActionContainer>
</Tooltip>
Expand Down

0 comments on commit c2e7c30

Please sign in to comment.