Skip to content

Commit 6246b33

Browse files
committed
Merge branch 'fix/fix-virtualization' into dev
2 parents 8d59b87 + e6f36ed commit 6246b33

35 files changed

+3243
-888
lines changed

devtools/chrometools/panel.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
body {
77
font-family: Arial, sans-serif;
88
padding: 20px;
9+
background: black;
10+
color: white;
911
}
1012
</style>
1113
</head>

examples/playwright.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
// playwright.config.ts
22
import { PlaywrightTestConfig, devices } from '@playwright/test';
33

4+
declare global {
5+
var __DEV__: boolean;
6+
}
7+
// Define __DEV__ globally for the test environment
8+
global.__DEV__ = !process.env.CI;
9+
410
const width = 1400;
511
const height = 1200;
612

examples/src/pages/demos/new-perf-approach.page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { TableRenderCellFnParam } from '@src/components/HeadlessTable/ReactHeadlessTableRenderer';
1+
// import { TableRenderCellFnParam } from '@src/components/HeadlessTable/ReactHeadlessTableRenderer';
22
// import { HeadlessTableWithPinnedContainers } from '@src/components/HeadlessTable/HeadlessTableWithPinnedContainers';
33

44
import * as React from 'react';
55
import { MatrixBrain } from '@infinite-table/infinite-react/components/VirtualBrain/MatrixBrain';
66
import { HeadlessTable } from '@src/components/HeadlessTable';
77
import { useState } from 'react';
8+
import { TableRenderCellFnParam } from '@infinite-table/infinite-react/src/components/HeadlessTable/rendererTypes';
89

910
export default function App() {
1011
const renderCell = (param: TableRenderCellFnParam) => {

examples/src/pages/demos/new-perf-approach2.page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { HeadlessTableWithPinnedContainers } from '@infinite-table/infinite-react/src/components/HeadlessTable/HeadlessTableWithPinnedContainers';
2-
import { TableRenderCellFnParam } from '@infinite-table/infinite-react/src/components/HeadlessTable/ReactHeadlessTableRenderer';
2+
import { TableRenderCellFnParam } from '@infinite-table/infinite-react/src/components/HeadlessTable/rendererTypes';
33
import { MatrixBrain } from '@infinite-table/infinite-react/src/components/VirtualBrain/MatrixBrain';
44
import * as React from 'react';
55
import { useState } from 'react';

examples/src/pages/tests/mapped-cells.spec.ts

Lines changed: 0 additions & 95 deletions
This file was deleted.
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
import * as React from 'react';
2+
3+
import {
4+
InfiniteTable,
5+
DataSource,
6+
InfiniteTableColumn,
7+
} from '@infinite-table/infinite-react';
8+
import { CarSale } from '@examples/datasets/CarSale';
9+
10+
const carsales: CarSale[] = [
11+
{
12+
category: '1 - Category 1 Truck',
13+
make: 'Acura',
14+
model: 'RDX 2WD',
15+
year: 2010,
16+
sales: 15,
17+
color: 'red',
18+
id: 0,
19+
},
20+
{
21+
category: '1 - Category 1 Truck',
22+
make: 'Acura',
23+
model: 'RDX 4WD',
24+
year: 2007,
25+
sales: 1,
26+
color: 'red',
27+
id: 1,
28+
},
29+
{
30+
category: '1 - Category 1 Truck',
31+
make: 'Acura',
32+
model: 'RDX 4WD',
33+
year: 2008,
34+
sales: 2,
35+
color: 'magenta',
36+
id: 2,
37+
},
38+
{
39+
category: '1 - Category 1 Truck',
40+
make: 'Acura',
41+
model: 'RDX 4WD',
42+
year: 2009,
43+
sales: 136,
44+
color: 'blue',
45+
id: 3,
46+
},
47+
{
48+
category: '1 - Category 1 Truck',
49+
make: 'Acura',
50+
model: 'RDX 4WD',
51+
year: 2010,
52+
color: 'blue',
53+
sales: 30,
54+
id: 4,
55+
},
56+
{
57+
category: '1 - Category 1 Truck',
58+
make: 'Acura',
59+
model: 'TSX',
60+
year: 2009,
61+
sales: 14,
62+
color: 'yellow',
63+
id: 5,
64+
},
65+
{
66+
category: '1 - Category 1 Truck',
67+
make: 'Acura',
68+
model: 'TSX',
69+
year: 2010,
70+
sales: 14,
71+
color: 'red',
72+
id: 6,
73+
},
74+
{
75+
category: '1 - Category 1 Truck',
76+
make: 'Audi',
77+
model: 'A3',
78+
year: 2009,
79+
sales: 2,
80+
color: 'magenta',
81+
id: 7,
82+
},
83+
];
84+
85+
(globalThis as any).carsales = carsales;
86+
87+
const columns: Record<string, InfiniteTableColumn<CarSale>> = {
88+
make: { field: 'make' },
89+
model: { field: 'model' },
90+
91+
category: {
92+
field: 'category',
93+
},
94+
count: {
95+
field: 'sales',
96+
},
97+
year: {
98+
field: 'year',
99+
type: 'number',
100+
},
101+
};
102+
103+
export default function DataTestPage() {
104+
return (
105+
<React.StrictMode>
106+
<DataSource<CarSale> data={carsales} primaryKey="id">
107+
<InfiniteTable<CarSale>
108+
domProps={{
109+
style: {
110+
margin: '5px',
111+
height: 900,
112+
border: '1px solid gray',
113+
position: 'relative',
114+
},
115+
}}
116+
columns={columns}
117+
/>
118+
</DataSource>
119+
</React.StrictMode>
120+
);
121+
}

examples/src/pages/tests/table/props/cell-selection/default.page.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
InfiniteTable,
55
DataSource,
66
DataSourcePropCellSelection_MultiCell,
7-
RowSelectionState,
87
} from '@infinite-table/infinite-react';
98

109
import type { InfiniteTablePropColumns } from '@infinite-table/infinite-react';
@@ -28,7 +27,7 @@ type Developer = {
2827
};
2928

3029
const dataSource = () => {
31-
return fetch(process.env.NEXT_PUBLIC_BASE_URL + '/developers100')
30+
return fetch(process.env.NEXT_PUBLIC_BASE_URL + '/developers1k')
3231
.then((r) => r.json())
3332
.then((data: Developer[]) => data);
3433
};
@@ -71,12 +70,6 @@ export default function GroupByExample() {
7170

7271
return (
7372
<>
74-
<div>
75-
Selected{' '}
76-
{cellSelection instanceof RowSelectionState
77-
? cellSelection.getSelectedCount()
78-
: false}
79-
</div>
8073
<DataSource<Developer>
8174
primaryKey="id"
8275
data={dataSource}

0 commit comments

Comments
 (0)