|
1 |
| -import React from 'react'; |
2 |
| -import ReactDataGrid from 'react-data-grid'; |
| 1 | +// import React from 'react'; |
| 2 | +// import ReactDataGrid from 'react-data-grid'; |
3 | 3 |
|
4 |
| -function DataGrid() { |
5 |
| - const columns = [ |
6 |
| - { key: 'idd', name: 'ID' }, |
7 |
| - { key: 'title', name: 'Title' }, |
8 |
| - { key: 'count', name: 'Count' }, |
9 |
| - ]; |
| 4 | +// function DataGrid() { |
| 5 | +// const columns = [ |
| 6 | +// { key: 'idd', name: 'ID' }, |
| 7 | +// { key: 'title', name: 'Title' }, |
| 8 | +// { key: 'count', name: 'Count' }, |
| 9 | +// ]; |
10 | 10 |
|
11 |
| - const rows = [ |
12 |
| - { idd: 0, title: 'row1', count: 20 }, |
13 |
| - { idd: 1, title: 'row1', count: 40 }, |
14 |
| - { idd: 2, title: 'row1', count: 60 }, |
15 |
| - ]; |
| 11 | +// const rows = [ |
| 12 | +// { idd: 0, title: 'row1', count: 20 }, |
| 13 | +// { idd: 1, title: 'row1', count: 40 }, |
| 14 | +// { idd: 2, title: 'row1', count: 60 }, |
| 15 | +// ]; |
16 | 16 |
|
17 |
| - // console.log(`ract data grid: rows`) |
18 |
| - // console.log(rows) |
19 |
| - // console.log(`ract data grid: columns`) |
20 |
| - // console.log(columns) |
| 17 | +// // console.log(`ract data grid: rows`) |
| 18 | +// // console.log(rows) |
| 19 | +// // console.log(`ract data grid: columns`) |
| 20 | +// // console.log(columns) |
21 | 21 |
|
22 |
| - function getRow(i) { |
23 |
| - console.log(`i=${i} rows{i}= ${rows[i]}`); |
24 |
| - return rows[i]; |
25 |
| - } |
| 22 | +// function getRow(i) { |
| 23 | +// console.log(`i=${i} rows{i}= ${rows[i]}`); |
| 24 | +// return rows[i]; |
| 25 | +// } |
26 | 26 |
|
27 |
| - return <ReactDataGrid columns={columns} rowGetter={i => rows[i]} rowsCount={2} minHeight={200} />; |
28 |
| -} |
| 27 | +// return <ReactDataGrid columns={columns} rowGetter={i => rows[i]} rowsCount={2} minHeight={200} />; |
| 28 | +// } |
29 | 29 |
|
30 |
| -export default DataGrid; |
| 30 | +// export default DataGrid; |
0 commit comments