Skip to content

[BUG] - Table sub components "as" prop does not work #5220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jprosevear opened this issue Apr 19, 2025 · 4 comments
Open

[BUG] - Table sub components "as" prop does not work #5220

jprosevear opened this issue Apr 19, 2025 · 4 comments

Comments

@jprosevear
Copy link

HeroUI Version

latest

Describe the bug

Using "as" prop on TableHeader, TableColumn, TableBody, TableRow,

It does have effect on Table

Your Example Website or App

https://codesandbox.io/p/devbox/dreamy-villani-kj37k4?file=%2FApp.jsx%3A16%2C24

Steps to Reproduce the Bug or Issue

See CodeSandbox

Expected behavior

as property takes effect

Screenshots or Videos

No response

Operating System Version

macOS

Browser

Chrome

Copy link

linear bot commented Apr 19, 2025

@wingkwong
Copy link
Member

I think as here shouldn't take effect as they should be just HTMLTableElement. May I know your use case that you need to use div?

@jprosevear
Copy link
Author

The div is just a sample - I'm trying to use a from Tanstack Router - if I pass an href the code will use an 'a' but that doesn't work, see adobe/react-spectrum#7695.

@drebot92
Copy link

drebot92 commented May 19, 2025

This is also a problem for me, I want to use <TableRow as={motion.tr} />, but it doesn't have any effect(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants