Skip to content

Commit 4e1fe7a

Browse files
committed
Fixed PR
1 parent acf926d commit 4e1fe7a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

packages/components/src/VirtualizedList/CellQualityBar/CellQualityBar.test.js

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ const props = {
1414
getDataFeature: noop,
1515
};
1616

17-
jest.unmock('@talend/design-system');
18-
1917
describe('CellQualityBar', () => {
2018
it('should render an empty quality bar', () => {
2119
const { baseElement } = render(<CellQualityBar />);

packages/design-system/src/components/RatioBar/RatioBarComposition.component.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ReactNode } from 'react';
1+
import { KeyboardEvent, MouseEvent, ReactNode } from 'react';
22

33
import classNames from 'classnames';
44

@@ -15,7 +15,7 @@ type RadioBarLineProps = {
1515
className: string;
1616
dataTestId?: string;
1717
dataFeature?: string | null;
18-
onClick?: any;
18+
onClick?: (e: MouseEvent<HTMLElement>) => void;
1919
};
2020

2121
export function RatioBarLine({
@@ -34,13 +34,13 @@ export function RatioBarLine({
3434
function onKeyDown(event: any) {
3535
switch (event.key) {
3636
case 'Enter':
37-
onClick(event);
37+
onClick?.(event);
3838
break;
3939
case ' ':
4040
case 'Spacebar':
4141
event.preventDefault(); // prevent scroll with space
4242
event.stopPropagation();
43-
onClick(event);
43+
onClick?.(event);
4444
break;
4545
default:
4646
break;

0 commit comments

Comments
 (0)