fix(table): virtualized table in firefox by replacing Spacer with css (#5963)

* chore(deps): remove spacer and bump theme peer dependency

* refactor(table): remove spacer

* fix(theme): replace spacer by css

* chore(changeset): add changeset

* chore(changeset): update changeset message
This commit is contained in:
WK 2025-12-04 23:13:46 +08:00 committed by GitHub
parent f08dfb8dd9
commit b89ba08ae0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 8 additions and 10 deletions

View File

@ -0,0 +1,6 @@
---
"@heroui/table": patch
"@heroui/theme": patch
---
fix(table): virtualized table in firefox by replacing Spacer with css (#2108, #5479)

View File

@ -36,7 +36,7 @@
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@heroui/theme": ">=2.4.17",
"@heroui/theme": ">=2.4.23",
"@heroui/system": ">=2.4.18"
},
"dependencies": {
@ -44,7 +44,6 @@
"@heroui/react-utils": "workspace:*",
"@heroui/shared-icons": "workspace:*",
"@heroui/shared-utils": "workspace:*",
"@heroui/spacer": "workspace:*",
"@react-aria/focus": "3.21.2",
"@react-aria/interactions": "3.25.6",
"@react-aria/table": "3.17.8",

View File

@ -1,7 +1,6 @@
import type {UseTableProps} from "./use-table";
import {useCallback} from "react";
import {Spacer} from "@heroui/spacer";
import {forwardRef} from "@heroui/system";
import {useTable} from "./use-table";
@ -111,7 +110,6 @@ const Table = forwardRef<"table", TableProps>((props, ref) => {
)}
</TableHeaderRow>
))}
<Spacer as="tr" tabIndex={-1} y={1} />
</TableRowGroup>
<TableBody
checkboxesProps={values.checkboxesProps}

View File

@ -1,7 +1,6 @@
import type {UseTableProps} from "./use-table";
import {useCallback, useLayoutEffect, useRef, useState} from "react";
import {Spacer} from "@heroui/spacer";
import {forwardRef} from "@heroui/system";
import {useVirtualizer} from "@tanstack/react-virtual";
@ -128,7 +127,6 @@ const VirtualizedTable = forwardRef<"table", TableProps>((props, ref) => {
)}
</TableHeaderRow>
))}
<Spacer as="tr" tabIndex={-1} y={1} />
</TableRowGroup>
<VirtualizedTableBody
checkboxesProps={values.checkboxesProps}

View File

@ -54,7 +54,7 @@ const table = tv({
"overflow-auto",
],
table: "min-w-full h-auto",
thead: "[&>tr]:first:rounded-lg",
thead: "[&>tr]:first:rounded-lg after:content-[''] after:table-row after:h-[5px]",
tbody: "after:block",
tr: ["group/tr", "outline-solid outline-transparent", ...dataFocusVisibleClasses],
th: [

3
pnpm-lock.yaml generated
View File

@ -2695,9 +2695,6 @@ importers:
'@heroui/shared-utils':
specifier: workspace:*
version: link:../../utilities/shared-utils
'@heroui/spacer':
specifier: workspace:*
version: link:../spacer
'@react-aria/focus':
specifier: 3.21.2
version: 3.21.2(react-dom@18.3.0(react@18.3.0))(react@18.3.0)