Skip to content

Commit a81c34d

Browse files
committed
Merge pull request DefinitelyTyped#7103 from stephenjelfs/master
Updated fixed-data-table to version 0.6.0
2 parents b5ce616 + 5088a85 commit a81c34d

File tree

4 files changed

+1043
-373
lines changed

4 files changed

+1043
-373
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/// <reference path="./fixed-data-table-0.4.7.d.ts"" />
2+
/// <reference path="../react/react.d.ts"/>
3+
/// <reference path="../react/react-dom.d.ts"/>
4+
5+
import * as React from "react";
6+
import * as ReactDOM from "react-dom";
7+
import * as FixedDataTable from "fixed-data-table";
8+
9+
var rows = [
10+
['a1', 'b1', 'c1'],
11+
['a2', 'b2', 'c2'],
12+
['a3', 'b3', 'c3'],
13+
// .... and more
14+
];
15+
16+
function rowGetter(rowIndex: number) {
17+
return rows[rowIndex];
18+
}
19+
20+
var table = <FixedDataTable.Table
21+
rowHeight={50}
22+
rowGetter={rowGetter}
23+
rowsCount={rows.length}
24+
width={5000}
25+
height={5000}
26+
headerHeight={50}>
27+
<FixedDataTable.Column
28+
label="Col 1"
29+
width={3000}
30+
dataKey={0}
31+
/>
32+
<FixedDataTable.Column
33+
label="Col 2"
34+
width={2000}
35+
dataKey={1}
36+
/>
37+
</FixedDataTable.Table>
38+
39+
ReactDOM.render(table, document.body);

0 commit comments

Comments
 (0)