-
Notifications
You must be signed in to change notification settings - Fork 72
[terra-table] Fix horizontal scrolling for Table Sections. #2060
Conversation
The change in terra-framework-docs does not affect consumers. No changelog is needed. |
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.
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.
LGTM, left one nit docs comment.
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.
/** | ||
* Bounding container for the flowsheet grid, will use window if no value provided. | ||
*/ | ||
boundingRef: PropTypes.func, |
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.
Is there a reason this prop is being removed? Because this would be a breaking change.
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.
The reason this is being removed is that we should not be forcing consumers to use a bounding ref in order to make the section headers sticky. Instead we are using the internal table container to control the sticky behavior. After this PR the sticky header will continue as before, but the component will not require this div anymore.
For current consumers, they will have the same experience, just that boundingRef
will do nothing anymore. It should be a passive change for consumers.
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.
Makes sense +1
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.
Small nit regarding documentation for consumers.
* Changed | ||
* `boundingRef` is no longer necessary for the section header's sticky behavior. The calculation now uses the table's container ref for calculating the offset. | ||
|
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.
nit:
* Changed | |
* `boundingRef` is no longer necessary for the section header's sticky behavior. The calculation now uses the table's container ref for calculating the offset. | |
* Removed | |
* Removed the `boundingRef` prop in favor of using the table's container ref for calculating the offset. is no longer needed for the section header's sticky behavior. This change is still passive in nature as it doesn't change any functionality for consumers. |
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.
Done
packages/terra-table/CHANGELOG.md
Outdated
@@ -2,6 +2,9 @@ | |||
|
|||
## Unreleased | |||
|
|||
* Changed | |||
* Table now uses its own container ref for calculating the offset while scrolling horizontally. `boundingRef` is no longer necessary for the scrolling behavior. |
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.
nit: Same suggestion as above.
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.
Done
Summary
What was changed:
The
boundingRef
prop is being removed in favor of using the table's internal container ref for calculating the offset needed for making the section headers sticky when scrolling horizontally.We are no longer utilizing
isTitleFixed
for the Section Headers inside table. Instead we are usingisTitleSticky
This PR fixes vertical scrolling for Section Headers within Tables.Why it was changed:
Consumer was reporting that section headers are not working when scrolling vertically.
Testing
This change was tested using:
Reviews
In addition to engineering reviews, this PR needs:
Additional Details
This PR resolves:
UXPLATFORM-10264
Thank you for contributing to Terra.
@cerner/terra