-
Notifications
You must be signed in to change notification settings - Fork 358
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
feat(Table): support custom components in expandable rows #1520
feat(Table): support custom components in expandable rows #1520
Conversation
PatternFly-React preview: https://1520-pr-patternfly-react-patternfly.surge.sh |
Codecov Report
@@ Coverage Diff @@
## master #1520 +/- ##
==========================================
+ Coverage 83.06% 83.11% +0.04%
==========================================
Files 564 566 +2
Lines 6101 6119 +18
Branches 59 59
==========================================
+ Hits 5068 5086 +18
Misses 1010 1010
Partials 23 23
Continue to review full report at Codecov.
|
c783607
to
592a1cf
Compare
? this.parentsExpanded(rows[parentId].parent) | ||
: rows[parentId].isOpen; | ||
} | ||
|
||
mapCells = (row, rowKey) => { | ||
const { headerData } = this.props; | ||
let shiftKey = Boolean(headerData[0] && headerData[0].extraParams.onSelect); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to see more comments, for example it looks like the shiftKey can take values of 0 | 1 | 2 here and then I am not sure how it is used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the comments, refactored that part and fixed a small bug in the process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope it is readable now
LGTM but this needs a look by @priley86 @karelhala |
thanks for reviewing @jschuler. I don't have any issue w/ this and it seems a nice addition, however, @karelhala is much more familiar. |
19b1924
to
1b9158a
Compare
+ enhanced the TS a bit |
0c2c957
to
e315386
Compare
by using expandable cellFormatter or ExpandableRowContent component - exposed isRowExpanded function for extensions to use
e315386
to
c73891c
Compare
@jschuler @karelhala - any additional thoughts here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codewise looks good. I am just a bit concern about breaking current API, can we document that somewhere so consumers will know about that? Also it would be good if we bump the version of table package so everybody knows that this API changed.
Hi, is this a breaking change? |
Not really if consumers are going to use the old way it's just going to look differently, but the table will still work and expandable actions will work as well. |
great! thanks @karelhala |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no issues on my side
Should I update the version? and write something to the |
I mean, should the version be |
No need to manually increment the version or update the changelog, this should be handled correctly by the build |
by using expandable cellFormatter or ExpandableRowContent component directly
#1227 is dependent on this PR.