BodyRows merge rowClassName properly #5983 #5995
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #5983
Thanks for your quick reply and code indication @melloware,
Even though it works! I digged a bit and found the issue to happened elsewhere (the
mergeProps
function).What is done in this PR:
classNameMergeFunction
props becausecontext.classNameMergeFunction
was undefined (and from docs it seems to be a left over of an old doc where it wasn't nested)classNames(cx('bodyRow', { rowProps: props }), rowClassName)
but I think it could allow to overridebg-row-odd
but I am not sure.This PR doesn't have test because I don't know how to write them (I am not a front end guy). I just tested by modifying the documentation example and see if it works.
before/after:
PS: you know you can copy permalink so you can directly jumps to code
primereact/components/lib/datatable/BodyRow.js
Line 471 in 0083b8d