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 doesn't pass through classes provided to its classNames prop #641

Closed
acolombi opened this issue Feb 8, 2017 · 12 comments
Closed

Table doesn't pass through classes provided to its classNames prop #641

acolombi opened this issue Feb 8, 2017 · 12 comments

Comments

@acolombi
Copy link
Contributor

acolombi commented Feb 8, 2017

Check out https://github.com/palantir/blueprint/blob/master/packages/table/src/table.tsx#L378. It would be nice if you passed through whatever classes are provided via className

@llorca
Copy link
Contributor

llorca commented Feb 8, 2017

@gscshoyru easy fix?

@giladgray
Copy link
Contributor

@gscshoyru is this fixed by #738?

@adidahiya
Copy link
Contributor

@giladgray nope

@gscshoyru
Copy link
Contributor

...wait, why would it not be fixed by that? It should be fixed by that.

@adidahiya
Copy link
Contributor

adidahiya commented Mar 2, 2017

Depends on what exactly @acolombi was asking for I guess. We still don't pass down any className prop provided to the top-level <Table> component.

@gscshoyru
Copy link
Contributor

Oh, I misunderstood, whoops. Thought this was a different issue.

Still probably a relatively easy fix though.

@acolombi
Copy link
Contributor Author

acolombi commented Mar 3, 2017

Correct. Yeah, I would imagine it's an easy fix.

@llorca llorca added this to the 1.13.0 milestone Mar 15, 2017
@cmslewis
Copy link
Contributor

@acolombi @adidahiya @gscshoyru etc. -

To clarify, what's the request here? To be able to add different custom CSS classes to the table container vs. the columns, or to be able to add the same custom CSS class to the table container and the columns?

The former suggests something like:

className?: string; // the CSS class applied to the table container
columnClassName?: string | (columnIndex: number) => string; // the CSS class to apply to each column

The latter suggests something like:

className?: string; // the CSS class applied to both the table container and each column

Tell me if my understanding is off the mark. Also, are we respecting this.props.className anywhere right now? Didn't immediately see where we were using it in the code, even on the table container.

@seansfkelley
Copy link

I just ran into this issue as well. I would expect className to appear on the toplevel Table container and nowhere else.

@cmslewis
Copy link
Contributor

I agree with @seansfkelley.

@acolombi
Copy link
Contributor Author

Yeah, likewise.

@seansfkelley
Copy link

Thanks Chris!

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

No branches or pull requests

7 participants