File tree 2 files changed +3
-18
lines changed
examples/vanilla/basic/src
packages/table-core/src/utils
2 files changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ type Person = {
12
12
status : string
13
13
progress : number
14
14
}
15
- /*
15
+
16
16
const data : Person [ ] = [
17
17
{
18
18
firstName : 'tanner' ,
@@ -38,10 +38,7 @@ const data: Person[] = [
38
38
status : 'Complicated' ,
39
39
progress : 10 ,
40
40
} ,
41
- ];
42
- */
43
-
44
- const data = new Array ( 50000 ) . fill ( { } ) ;
41
+ ]
45
42
46
43
const columnHelper = createColumnHelper < Person > ( )
47
44
@@ -99,15 +96,8 @@ const renderTable = () => {
99
96
theadElement . appendChild ( trElement )
100
97
} )
101
98
102
-
103
- table . getRowModel ( ) ;
104
-
105
-
106
- /*
107
99
// Render table rows
108
- table.getRowModel().rows.forEach((row, idx) => {
109
- if (idx > 10) return;
110
-
100
+ table . getRowModel ( ) . rows . forEach ( row => {
111
101
const trElement = document . createElement ( 'tr' )
112
102
row . getVisibleCells ( ) . forEach ( cell => {
113
103
const tdElement = document . createElement ( 'td' )
@@ -120,7 +110,6 @@ const renderTable = () => {
120
110
tbodyElement . appendChild ( trElement )
121
111
} )
122
112
123
- /*
124
113
// Render table footers
125
114
table . getFooterGroups ( ) . forEach ( footerGroup => {
126
115
const trElement = document . createElement ( 'tr' )
@@ -134,8 +123,6 @@ const renderTable = () => {
134
123
tfootElement . appendChild ( trElement )
135
124
} )
136
125
137
- */
138
-
139
126
// Clear previous content and append new content
140
127
const wrapperElement = document . getElementById ( 'wrapper' ) as HTMLDivElement
141
128
wrapperElement . innerHTML = ''
Original file line number Diff line number Diff line change @@ -71,9 +71,7 @@ export function getCoreRowModel<TData extends RowData>(): (
71
71
return rows
72
72
}
73
73
74
- console . time ( 'accessRows' ) ;
75
74
rowModel . rows = accessRows ( data )
76
- console . timeEnd ( 'accessRows' ) ;
77
75
78
76
return rowModel
79
77
} ,
You can’t perform that action at this time.
0 commit comments