Skip to content

Commit ee017d4

Browse files
committed
wip
1 parent 94da317 commit ee017d4

16 files changed

+8747
-9851
lines changed

Diff for: .gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,6 @@ test-results
101101
.contentlayer
102102

103103
/www/public/_pagefind
104-
tsconfig.tsbuildinfo
104+
tsconfig.tsbuildinfo
105+
106+
.parcel-cache

Diff for: examples/src/pages/_app.page.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as React from 'react';
2+
import Head from 'next/head';
23
import '../index.global.css';
34
import '../globals.css';
45

@@ -20,6 +21,12 @@ function MyApp({ Component, pageProps }: any) {
2021
//@ts-ignore ignore
2122
style={{ '--it-row-height': '3rem', color: 'var(--infinite-cell-color)' }}
2223
>
24+
<Head>
25+
<meta
26+
http-equiv="Content-Security-Policy"
27+
content="default-src * 'unsafe-inline'; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'; img-src * data: 'unsafe-inline'; connect-src * 'unsafe-inline'; frame-src *;"
28+
/>
29+
</Head>
2330
<Component {...pageProps} />
2431
</div>
2532
);

Diff for: examples/src/pages/tests/table/props/data/basic.page.tsx

+47-13
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,55 @@ const columns: Record<string, InfiniteTableColumn<CarSale>> = {
101101
};
102102

103103
export default function DataTestPage() {
104+
const [active, setActive] = React.useState([true, false]);
104105
return (
105106
<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>
107+
<button onClick={() => setActive([!active[0], active[1]])}>
108+
toggle test
109+
</button>
110+
{active[0] && (
111+
<DataSource<CarSale> data={carsales} primaryKey="id">
112+
<InfiniteTable<CarSale>
113+
debugId="test"
114+
debugMode
115+
domProps={{
116+
style: {
117+
margin: '5px',
118+
height: 900,
119+
border: '1px solid gray',
120+
position: 'relative',
121+
},
122+
}}
123+
columns={columns}
124+
/>
125+
</DataSource>
126+
)}
127+
<button onClick={() => setActive([active[0], !active[1]])}>
128+
toggle simple
129+
</button>
130+
{active[1] && (
131+
<DataSource<CarSale>
132+
data={carsales}
133+
primaryKey="id"
134+
selectionMode="multi-row"
135+
>
136+
<InfiniteTable<CarSale>
137+
debugId="simple"
138+
debugMode
139+
domProps={{
140+
style: {
141+
margin: '5px',
142+
height: 900,
143+
border: '1px solid gray',
144+
position: 'relative',
145+
},
146+
}}
147+
columns={{
148+
make: columns.make,
149+
}}
150+
/>
151+
</DataSource>
152+
)}
119153
</React.StrictMode>
120154
);
121155
}

0 commit comments

Comments
 (0)