Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/preact-table-devtools-preact-11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/preact-table-devtools': patch
---

Type-check against Preact 11, which requires an initial value for `useRef`.
5 changes: 5 additions & 0 deletions .changeset/preact-table-preact-store-0-13-5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/preact-table': patch
---

Require `@tanstack/preact-store` `^0.13.5`, the first version whose `preact` peer range allows Preact 11.
4 changes: 2 additions & 2 deletions examples/preact/aggregation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
},
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-store": "^0.13.4",
"@tanstack/preact-store": "^0.13.5",
"@tanstack/preact-table": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/basic-dynamic-columns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@tanstack/preact-pacer": "^0.24.0",
"@tanstack/preact-table": "^9.2.8",
"@tanstack/preact-table-devtools": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
4 changes: 2 additions & 2 deletions examples/preact/basic-external-atoms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-devtools": "^0.10.13",
"@tanstack/preact-store": "^0.13.4",
"@tanstack/preact-store": "^0.13.5",
"@tanstack/preact-table": "^9.2.8",
"@tanstack/preact-table-devtools": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
4 changes: 2 additions & 2 deletions examples/preact/basic-external-state/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-devtools": "^0.10.13",
"@tanstack/preact-store": "^0.13.4",
"@tanstack/preact-store": "^0.13.5",
"@tanstack/preact-table": "^9.2.8",
"@tanstack/preact-table-devtools": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
4 changes: 2 additions & 2 deletions examples/preact/basic-subscribe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-devtools": "^0.10.13",
"@tanstack/preact-store": "^0.13.4",
"@tanstack/preact-store": "^0.13.5",
"@tanstack/preact-table": "^9.2.8",
"@tanstack/preact-table-devtools": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/basic-use-app-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@tanstack/preact-devtools": "^0.10.13",
"@tanstack/preact-table": "^9.2.8",
"@tanstack/preact-table-devtools": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/basic-use-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@tanstack/preact-devtools": "^0.10.13",
"@tanstack/preact-table": "^9.2.8",
"@tanstack/preact-table-devtools": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
4 changes: 2 additions & 2 deletions examples/preact/cell-selection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-devtools": "^0.10.13",
"@tanstack/preact-hotkeys": "^0.12.1",
"@tanstack/preact-store": "^0.13.4",
"@tanstack/preact-store": "^0.13.5",
"@tanstack/preact-table": "^9.2.8",
"@tanstack/preact-table-devtools": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/cell-spanning/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-table": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/column-ordering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-table": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/column-pinning-split/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-table": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/column-pinning-sticky/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-table": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
4 changes: 2 additions & 2 deletions examples/preact/column-pinning-sticky/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const getCommonPinningStyles = (
isPinned === 'end' ? `${column.getAfter('end')}px` : undefined,
opacity: isPinned ? 0.95 : 1,
position: isPinned ? 'sticky' : 'relative',
width: column.getSize(),
width: `${column.getSize()}px`,
zIndex: isPinned ? 1 : 0,
}
}
Expand Down Expand Up @@ -180,7 +180,7 @@ function App() {
<div className="table-container">
<table
style={{
width: table.getTotalSize(),
width: `${table.getTotalSize()}px`,
}}
>
<thead>
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/column-pinning/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-table": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/column-resizing-performant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-table": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
4 changes: 2 additions & 2 deletions examples/preact/column-resizing-performant/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function App() {
{table.getHeaderGroups().map((headerGroup) => (
<tr
key={headerGroup.id}
style={{ display: 'flex', width: '100%', height: 30 }}
style={{ display: 'flex', width: '100%', height: '30px' }}
>
{headerGroup.headers.map((header) => (
<th
Expand Down Expand Up @@ -209,7 +209,7 @@ function TableBody({ table }: TableBodyProps) {
style={{
display: 'flex',
width: '100%',
height: 30,
height: '30px',
// Offscreen rows skip style recalc and layout entirely, so a live
// column resize only lays out the rows actually on screen.
contentVisibility: 'auto',
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/column-resizing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-table": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
25 changes: 14 additions & 11 deletions examples/preact/column-resizing/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function App() {
<div className="spacer-md" />
<div className="section-title">{'<table/>'}</div>
<div className="scroll-container">
<table style={{ width: table.getCenterTotalSize() }}>
<table style={{ width: `${table.getCenterTotalSize()}px` }}>
<thead>
{table.getHeaderGroups().map((headerGroup) => (
<tr key={headerGroup.id}>
Expand All @@ -138,7 +138,7 @@ function App() {
key={header.id}
colSpan={header.colSpan}
style={{
width: header.getSize(),
width: `${header.getSize()}px`,
}}
>
{header.isPlaceholder ? null : (
Expand Down Expand Up @@ -176,7 +176,7 @@ function App() {
<td
key={cell.id}
style={{
width: cell.column.getSize(),
width: `${cell.column.getSize()}px`,
}}
>
<table.FlexRender cell={cell} />
Expand All @@ -190,7 +190,10 @@ function App() {
<div className="spacer-md" />
<div className="section-title">{'<div/> (relative)'}</div>
<div className="scroll-container">
<div className="divTable" style={{ width: table.getTotalSize() }}>
<div
className="divTable"
style={{ width: `${table.getTotalSize()}px` }}
>
<div className="thead">
{table.getHeaderGroups().map((headerGroup) => (
<div key={headerGroup.id} className="tr">
Expand All @@ -199,7 +202,7 @@ function App() {
key={header.id}
className="th"
style={{
width: header.getSize(),
width: `${header.getSize()}px`,
}}
>
{header.isPlaceholder ? null : (
Expand Down Expand Up @@ -238,7 +241,7 @@ function App() {
key={cell.id}
className="td"
style={{
width: cell.column.getSize(),
width: `${cell.column.getSize()}px`,
}}
>
<table.FlexRender cell={cell} />
Expand All @@ -255,7 +258,7 @@ function App() {
<div
className="divTable"
style={{
width: table.getTotalSize(),
width: `${table.getTotalSize()}px`,
}}
>
<div className="thead">
Expand All @@ -273,8 +276,8 @@ function App() {
className="th"
style={{
position: 'absolute',
left: header.getStart(),
width: header.getSize(),
left: `${header.getStart()}px`,
width: `${header.getSize()}px`,
}}
>
{header.isPlaceholder ? null : (
Expand Down Expand Up @@ -320,8 +323,8 @@ function App() {
className="td"
style={{
position: 'absolute',
left: cell.column.getStart(),
width: cell.column.getSize(),
left: `${cell.column.getStart()}px`,
width: `${cell.column.getSize()}px`,
}}
>
<table.FlexRender cell={cell} />
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/column-sizing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-table": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
22 changes: 11 additions & 11 deletions examples/preact/column-sizing/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function App() {
<div className="scroll-container">
<table
style={{
width: table.getCenterTotalSize(),
width: `${table.getCenterTotalSize()}px`,
}}
>
<thead>
Expand All @@ -123,7 +123,7 @@ function App() {
key={header.id}
colSpan={header.colSpan}
style={{
width: header.getSize(),
width: `${header.getSize()}px`,
}}
>
{header.isPlaceholder ? null : (
Expand All @@ -142,7 +142,7 @@ function App() {
<td
key={cell.id}
style={{
width: cell.column.getSize(),
width: `${cell.column.getSize()}px`,
}}
>
<table.FlexRender cell={cell} />
Expand All @@ -159,7 +159,7 @@ function App() {
<div
className="divTable"
style={{
width: table.getTotalSize(),
width: `${table.getTotalSize()}px`,
}}
>
<div className="thead">
Expand All @@ -170,7 +170,7 @@ function App() {
key={header.id}
className="th"
style={{
width: header.getSize(),
width: `${header.getSize()}px`,
}}
>
{header.isPlaceholder ? null : (
Expand All @@ -190,7 +190,7 @@ function App() {
key={cell.id}
className="td"
style={{
width: cell.column.getSize(),
width: `${cell.column.getSize()}px`,
}}
>
<table.FlexRender cell={cell} />
Expand All @@ -207,7 +207,7 @@ function App() {
<div
className="divTable"
style={{
width: table.getTotalSize(),
width: `${table.getTotalSize()}px`,
}}
>
<div className="thead">
Expand All @@ -225,8 +225,8 @@ function App() {
className="th"
style={{
position: 'absolute',
left: header.getStart(),
width: header.getSize(),
left: `${header.getStart()}px`,
width: `${header.getSize()}px`,
}}
>
{header.isPlaceholder ? null : (
Expand All @@ -253,8 +253,8 @@ function App() {
className="td"
style={{
position: 'absolute',
left: cell.column.getStart(),
width: cell.column.getSize(),
left: `${cell.column.getStart()}px`,
width: `${cell.column.getSize()}px`,
}}
>
<table.FlexRender cell={cell} />
Expand Down
2 changes: 1 addition & 1 deletion examples/preact/column-visibility/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@faker-js/faker": "^10.6.0",
"@tanstack/preact-table": "^9.2.8",
"preact": "^10.29.8"
"preact": "^11.0.1"
},
"devDependencies": {
"@preact/preset-vite": "^2.10.6",
Expand Down
Loading
Loading