Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] sap.uxap.ObjectPageSubSection: Fix non-expanding Table
Problem: sap.ui.table.Table is not expanded in a SubSection with sapUxAPObjectPageSubSectionFitContainer class. What happens is: 1. OPL is rendered, SubSection receives the sapUxAPObjectPageSubSectionFitContainer class and calculates its own height. Fixed height is set. 2. Table calculates how much rows it can show in Auto mode. Fixed height is set. 3. headerTitle of OPL is changed and now it has bigger height. 4. SubSection adjusts its height, but as the Table has already taken up the whole available space and shows maximum possible number of rows, the SubSection detects that its scrollHeight is bigger than its height (scroll is needed). It sets auto height. 5. Table adjusts its visible rows count in order to fill up the new available space and again fits in the SubSection, without scrollbar needed. Auto height is set, as the parent container is also with auto height. 6. However, when SubSection set auto height, it does not save it in the _height private property. So that, when .setHeight is called again with the previously calculated height, the setHeight function returns and does not call _adaptDomHeigt. 7. As adaptDomHeight is not called, fixed height is not set to the SubSection and now it still has auto height. As a result, its height is equal to the height of the Table with minRowCount --> the Table does not expand any more. Solution: Save the auto height in the private _height property, so we can set fixed height later, if needed (something has changed --> Table has adjusted itself). BCP: 2370133187 SNOW: CS20240007584409 Change-Id: I3de9c59fd54ad094ef487fe99d73d8448ccf90ae (cherry picked from commit 0c93e62) CR-Id: 002075125900002194992024
- Loading branch information