forked from github/vscode-codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRawTableRow.tsx
More file actions
31 lines (28 loc) · 915 Bytes
/
RawTableRow.tsx
File metadata and controls
31 lines (28 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import * as React from 'react';
import { ResultRow } from '../../pure/bqrs-cli-types';
import { selectableZebraStripe } from './result-table-utils';
import RawTableValue from './RawTableValue';
interface Props {
rowIndex: number;
row: ResultRow;
databaseUri: string;
className?: string;
isSelected?: boolean;
onSelected?: (row: number, column: number) => void;
}
export default function RawTableRow(props: Props) {
return (
<tr key={props.rowIndex} {...selectableZebraStripe(props.isSelected ?? false, props.rowIndex, props.className || '')}>
<td key={-1}>{props.rowIndex + 1}</td>
{props.row.map((value, columnIndex) => (
<td key={columnIndex}>
<RawTableValue
value={value}
databaseUri={props.databaseUri}
onSelected={() => props.onSelected?.(props.rowIndex, columnIndex)}
/>
</td>
))}
</tr>
);
}