Skip to content

Commit b6c60b2

Browse files
Rename handleClick => onClick
1 parent 1f16294 commit b6c60b2

6 files changed

Lines changed: 19 additions & 19 deletions

File tree

extensions/ql-vscode/src/view/results/RawTableValue.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function RawTableValue(props: Props): JSX.Element {
2424
loc={rawValue.url}
2525
label={rawValue.label}
2626
databaseUri={props.databaseUri}
27-
handleClick={props.onSelected}
27+
onClick={props.onSelected}
2828
/>
2929
);
3030
}

extensions/ql-vscode/src/view/results/alert-table.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export class AlertTable extends React.Component<
130130
relatedLocations={result.relatedLocations}
131131
sourceLocationPrefix={sourceLocationPrefix}
132132
databaseUri={databaseUri}
133-
handleClick={updateSelectionCallback(resultKey)}
133+
onClick={updateSelectionCallback(resultKey)}
134134
/>
135135
);
136136

@@ -144,7 +144,7 @@ export class AlertTable extends React.Component<
144144
loc={result.locations[0]}
145145
sourceLocationPrefix={sourceLocationPrefix}
146146
databaseUri={databaseUri}
147-
handleClick={updateSelectionCallback(resultKey)}
147+
onClick={updateSelectionCallback(resultKey)}
148148
/>
149149
);
150150
const locationCells = (
@@ -262,7 +262,7 @@ export class AlertTable extends React.Component<
262262
loc={step.location}
263263
sourceLocationPrefix={sourceLocationPrefix}
264264
databaseUri={databaseUri}
265-
handleClick={updateSelectionCallback(pathNodeKey)}
265+
onClick={updateSelectionCallback(pathNodeKey)}
266266
/>
267267
) : (
268268
"[no location]"
@@ -273,7 +273,7 @@ export class AlertTable extends React.Component<
273273
loc={step.location}
274274
sourceLocationPrefix={sourceLocationPrefix}
275275
databaseUri={databaseUri}
276-
handleClick={updateSelectionCallback(pathNodeKey)}
276+
onClick={updateSelectionCallback(pathNodeKey)}
277277
/>
278278
) : (
279279
""

extensions/ql-vscode/src/view/results/locations/ClickableLocation.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface Props {
88
label: string;
99
databaseUri: string;
1010
title?: string;
11-
handleClick?: () => void;
11+
onClick?: () => void;
1212
}
1313

1414
/**
@@ -19,16 +19,16 @@ export function ClickableLocation({
1919
label,
2020
databaseUri,
2121
title,
22-
handleClick,
22+
onClick: onClick,
2323
}: Props): JSX.Element {
2424
const jumpToLocationHandler = useCallback(
2525
(e: React.MouseEvent) => {
2626
e.preventDefault();
2727
e.stopPropagation();
2828
jumpToLocation(loc, databaseUri);
29-
handleClick?.();
29+
onClick?.();
3030
},
31-
[loc, databaseUri, handleClick],
31+
[loc, databaseUri, onClick],
3232
);
3333

3434
return (

extensions/ql-vscode/src/view/results/locations/Location.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface Props {
1515
label?: string;
1616
databaseUri?: string;
1717
title?: string;
18-
handleClick?: () => void;
18+
onClick?: () => void;
1919
}
2020

2121
/**
@@ -26,7 +26,7 @@ export function Location({
2626
label,
2727
databaseUri,
2828
title,
29-
handleClick,
29+
onClick,
3030
}: Props): JSX.Element {
3131
const resolvableLoc = useMemo(() => tryGetResolvableLocation(loc), [loc]);
3232
const displayLabel = useMemo(() => convertNonPrintableChars(label), [label]);
@@ -49,7 +49,7 @@ export function Location({
4949
label={displayLabel}
5050
databaseUri={databaseUri}
5151
title={title}
52-
handleClick={handleClick}
52+
onClick={onClick}
5353
/>
5454
);
5555
}

extensions/ql-vscode/src/view/results/locations/SarifLocation.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface Props {
1111
loc?: Sarif.Location;
1212
sourceLocationPrefix: string;
1313
databaseUri: string;
14-
handleClick: () => void;
14+
onClick: () => void;
1515
}
1616

1717
/**
@@ -25,7 +25,7 @@ export function SarifLocation({
2525
loc,
2626
sourceLocationPrefix,
2727
databaseUri,
28-
handleClick,
28+
onClick,
2929
}: Props) {
3030
const parsedLoc = useMemo(
3131
() => loc && parseSarifLocation(loc, sourceLocationPrefix),
@@ -42,7 +42,7 @@ export function SarifLocation({
4242
label={text || `${basename(parsedLoc.userVisibleFile)}`}
4343
databaseUri={databaseUri}
4444
title={text ? undefined : `${parsedLoc.userVisibleFile}`}
45-
handleClick={handleClick}
45+
onClick={onClick}
4646
/>
4747
);
4848
}
@@ -59,7 +59,7 @@ export function SarifLocation({
5959
}
6060
databaseUri={databaseUri}
6161
title={text ? undefined : `${parsedLoc.userVisibleFile}`}
62-
handleClick={handleClick}
62+
onClick={onClick}
6363
/>
6464
);
6565
}

extensions/ql-vscode/src/view/results/locations/SarifMessageWithLocations.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface Props {
88
relatedLocations: Sarif.Location[];
99
sourceLocationPrefix: string;
1010
databaseUri: string;
11-
handleClick: () => void;
11+
onClick: () => void;
1212
}
1313

1414
/**
@@ -19,7 +19,7 @@ export function SarifMessageWithLocations({
1919
relatedLocations,
2020
sourceLocationPrefix,
2121
databaseUri,
22-
handleClick,
22+
onClick,
2323
}: Props) {
2424
const relatedLocationsById: Map<number, Sarif.Location> = new Map();
2525
for (const loc of relatedLocations) {
@@ -41,7 +41,7 @@ export function SarifMessageWithLocations({
4141
loc={relatedLocationsById.get(part.dest)}
4242
sourceLocationPrefix={sourceLocationPrefix}
4343
databaseUri={databaseUri}
44-
handleClick={handleClick}
44+
onClick={onClick}
4545
/>
4646
);
4747
}

0 commit comments

Comments
 (0)