| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
- This is important when using React hooks
|
PatternFly-React preview: https://patternfly-react-pr-3612.surge.sh |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #3612 +/- ##
=======================================
Coverage 67.15% 67.15%
=======================================
Files 907 907
Lines 25559 25559
Branches 2267 2267
=======================================
Hits 17165 17165
Misses 7353 7353
Partials 1041 1041
Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
Requesting review from @priley86 as per github's suggestion. Please let me know if I should do something else. Thanks! |
Sorry, something went wrong.
There was a problem hiding this comment.
Looking really good!
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #3620
In my case, I'm using the Table and passing a onCollapse method within a React component that uses hooks.
I need the columns that are a function, but a different one, to be updated, I'm using as example onCollapse, but this applies to any other column.
Consider below code:
With this in place, on first render, all the rows have my initial rowState value.
If i click the first cell, only that cell is going to have the updated rowState (where it is open) and the others will have the old rowState (nothing open).
When clicking the second row, it will discard my modified rowState (because this cell doesn't have access to it) and only open what I clicked.
See below gif without the contents of this PR:
and with this PR content: