MCPcopy Create free account
hub / github.com/microsoft/SandDance / Table

Function Table

packages/vega-deck.gl/src/controls.tsx:26–51  ·  view source on GitHub ↗
(props: StatelessProps<TableProps>)

Source from the content-addressed store, hash-verified

24};
25
26export const Table: StatelessComponent<TableProps> = (props: StatelessProps<TableProps>) => {
27 return (
28 <table className={props.className}>
29 {props.children}
30 {props.rows.map((row, i) => (
31 <tr
32 className={props.rowClassName || ''}
33 onClick={e => props.onRowClick && props.onRowClick(e as any as MouseEvent, i)}
34 tabIndex={props.onRowClick ? 0 : -1}
35 onKeyUp={e => {
36 if (e.key === KeyCodes.ENTER && props.onRowClick) {
37 props.onRowClick(e as any as KeyboardEvent, i);
38 }
39 }}
40 >
41 {row.cells.map((cell, i) => (
42 <td
43 className={cell.className || ''}
44 title={cell.title || ''}
45 >{cell.content}</td>
46 ))}
47 </tr>
48 ))}
49 </table>
50 );
51};

Callers 1

renderTooltipFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected