Skip to content
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

Table Header Column Css Class #107

Open
cyberyaga opened this issue Mar 18, 2023 · 1 comment
Open

Table Header Column Css Class #107

cyberyaga opened this issue Mar 18, 2023 · 1 comment

Comments

@cyberyaga
Copy link

Hello... Loving this project so far.

I have a quick question. I am using the table component. I am specifying my ChildContent and my Column (s) for the table. And I need to make some of the columns dissapear on a small screen.

The Column child component has a CssClass parameter. But it only gets applied to the TD, not the TH. So, when the screen is small only the content is hidden, and the header stays.

How can I get around this?

Thanks

@jacobpihl
Copy link
Collaborator

Hi!

If you can get the "if small screen" condition into a variable you can do

@if (!screenIsSmall)
{
    <Column>
        ....
    </Column>
}

Then the column won't be shown on smaller screens.
Maybe ResizeObserver can be of help as well https://tabblazor.com/docs/helpers/resize-observer.

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

2 participants