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

Ability to add ClassName to Row Wrapper #151

Closed
jakeseaton opened this issue Apr 20, 2017 · 3 comments
Closed

Ability to add ClassName to Row Wrapper #151

jakeseaton opened this issue Apr 20, 2017 · 3 comments

Comments

@jakeseaton
Copy link

I am trying to use react-select to allow users to edit the content of cells. The select dropdowns get cut off, because the rowWrapper and all of its descendants have overflow: hidden on them.

screen shot 2017-04-20 at 11 17 58 am

The api doesn't seem to expose any ability to conditionally add a class to the row wrapper, so I am having to use jquery when cells are clicked, and then override the overflow-y.

<Cell
    onClick={e => $(e.target).closest(".fixedDataTableRowLayout_rowWrapper").addClass("clickedRow")}
/>

It would be great if I could do something like

<Table
    rowClassName={rowIndex => rowIndex === clickedRowIndex && "clickedRow" }
/>
@jakeseaton jakeseaton changed the title Ability to add Class to Row Wrapper Ability to add ClassNAme to Row Wrapper Apr 20, 2017
@jakeseaton jakeseaton changed the title Ability to add ClassNAme to Row Wrapper Ability to add ClassName to Row Wrapper Apr 20, 2017
@wcjordan
Copy link
Member

wcjordan commented Apr 20, 2017

Your best bet may be to follow Kam's advice here #48

We also have open issues #60 and #33 which could benefit from some details on your use case for future library improvements. If you can get a work around going, could you close this and add some use case details to those tickets.

@jphamilton
Copy link

@jakeseaton Can you elaborate on what you did with jquery? I can't even get my hacks to work, so any insights would be helpful.

@wcjordan
Copy link
Member

wcjordan commented May 4, 2020

This is now supported w/ the rowClassNameGetter prop on the Table component

@wcjordan wcjordan closed this as completed May 4, 2020
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