Reputation: 25
I tried to fit my sap.ui.table.Table
into a sap.f.DynamicPage
but the table height won't dynamically resize to the available space in the page content.
I tried to implement the sap.m.VBox
with the table attribute visibleRowCountMode="Auto"
to fix this problem but the table height is just fixed to the minAutoRowCount
parameter of the table.
Here is the code snippet of the table inside the page content:
<f:content>
<VBox fitContainer="true">
<OverflowToolbar>
<!-- ... -->
</OverflowToolbar>
<table:Table visibleRowCountMode="Auto"
minAutoRowCount="10"
noData="{i18n>noDataText}"
width="auto">
<!-- ... -->
</table:Table>
</VBox>
</f:content>
Any suggestions how the height of the table is resized, for example, if the page header is collapsed / expanded?
SAPUI5 Version: 1.60.1
Upvotes: 1
Views: 3135
Reputation: 418
Update: adding FlexItemData growFactor worked for my smarttable.
use property
visibleRowCountMode="Auto"
Update
<layoutData>
<FlexItemData growFactor="1" baseSize="0%"/>
</layoutData>
table:
<Table id="DynamicTableId" selectionMode="MultiToggle" visibleRowCountMode="Auto" minAutoRowCount="10" noData="{i18n>noDataText}"
fixedColumnCount="1" showColumnVisibilityMenu="true" modelContextChange="onModelContextChange" width="auto">
<layoutData>
<FlexItemData growFactor="1" baseSize="0%"/>
</layoutData>
</Table>
regards
Upvotes: 2