Table will now assign the same width as our main content column (MOBILE_SCREEN_WIDTH) by default and immediately starts observing the parent element for size changes using useParentSize util. If the parent element width is not 0 it will resize the Table to match.
I added useParentSize which is based on this package's code but stripped down from TS and modified to actually grab the parent elements size from the Table ref.
Related Issue
DEVSITE-755
Motivation and Context
Table wasn't resizing correctly when nested in a parent element with fickle width size.
How Has This Been Tested?
Tested in the example and aep-mobile-sdk pages with tables.
Screenshots (if appropriate):
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
Table will now assign the same width as our main content column (
MOBILE_SCREEN_WIDTH
) by default and immediately starts observing the parent element for size changes usinguseParentSize
util. If the parent element width is not 0 it will resize the Table to match.I added
useParentSize
which is based on this package's code but stripped down from TS and modified to actually grab the parent elements size from the Table ref.Related Issue
DEVSITE-755
Motivation and Context
Table wasn't resizing correctly when nested in a parent element with fickle width size.
How Has This Been Tested?
Tested in the example and aep-mobile-sdk pages with tables.
Screenshots (if appropriate):
Types of changes
Checklist: