Sapui5 ui.table的面板内容高度错误(visibleRowCountMode=";Auto";)
我想有一个布局,它有一个固定大小的面板,顶部有一个窗体,底部有一个网格,占据剩余空间。我已经设法使面板具有正确的大小-因此网格面板的section html标记具有100%且正确的跨距,但是内容的嵌套div的高度计算为0px 什么定义是必需的或缺少的,以便网格占据完整的剩余空间Sapui5 ui.table的面板内容高度错误(visibleRowCountMode=";Auto";),sapui5,Sapui5,我想有一个布局,它有一个固定大小的面板,顶部有一个窗体,底部有一个网格,占据剩余空间。我已经设法使面板具有正确的大小-因此网格面板的section html标记具有100%且正确的跨距,但是内容的嵌套div的高度计算为0px 什么定义是必需的或缺少的,以便网格占据完整的剩余空间 <mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:l="sap.ui.layout"
<mvc:View
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:l="sap.ui.layout"
xmlns:f="sap.ui.layout.form"
xmlns:t="sap.ui.table"
height="100%">
<l:FixFlex class="fixFlexFixedSize" fixContentSize="100px">
<l:fixContent>
<Panel class="sapUiNoContentPadding">
<headerToolbar>
<Toolbar>
<Title text="Form" level="H2" />
</Toolbar>
</headerToolbar>
<content>
<f:Form editable="true">
<f:layout>
<f:ResponsiveGridLayout
labelSpanL="2"
labelSpanM="2"
emptySpanL="1"
emptySpanM="1"
columnsL="2"
columnsM="2" />
</f:layout>
<f:formContainers>
<f:FormContainer>
<f:formElements>
<f:FormElement label="Lastname">
<f:fields>
<Input id="lastname" />
</f:fields>
</f:FormElement>
</f:formElements>
</f:FormContainer>
<f:FormContainer>
<f:FormElement label="Firstname">
<f:fields>
<Input id="firstname" />
</f:fields>
</f:FormElement>
</f:FormContainer>
</f:formContainers>
</f:Form>
</content>
</Panel>
</l:fixContent>
<l:flexContent>
<Panel height="100%" class="sapUiNoContentPadding">
<headerToolbar>
<Toolbar>
<Title text="Grid" level="H2" />
<ToolbarSpacer />
<Button icon="sap-icon://add" text="new" press="newEntry" />
</Toolbar>
</headerToolbar>
<content>
<t:Table
rows="{entries>/result}"
enableSelectAll="false"
selectionMode="None"
visibleRowCountMode="Auto"
height="100%">
<t:columns>
<t:Column width="5rem" >
<Label text="{i18n>entrieslist.column.name}" />
<t:template>
<Link text="{entries>lastname}" press="showDetailsPage"/>
</t:template>
</t:Column>
<t:Column width="5rem" >
<t:template>
<Text text="{entries>firstname}" />
</t:template>
</t:Column>
<t:Column width="11rem" sorted="true" sortProperty="{entries>telephone} ">
<Label text="{i18n>entrieslist.column.number}" />
<t:template>
<Text text="{entries>telephone}" />
</t:template>
</t:Column>
<t:Column width="11rem" >
<Label text="{i18n>entrieslist.column.street}" />
<t:template>
<Text text="{entries>street}" />
</t:template>
</t:Column>
</t:columns>
</t:Table>
</content>
</Panel>
</l:flexContent>
</l:FixFlex>
</mvc:View>
我不确定我是否遇到了bug或者用例不受支持。我的示例位于通过路由访问的视图中。当我从默认页面导航时,大小调整工作正常——如果直接通过url哈希跳转到页面,则会失败(如上所述)。此外,如果渲染网格并调整窗口大小,则不会重新计算面板高度。我也面临同样的问题。我设法在chrome中为内容设置了一个style=“height:100%”的解决方案,但在firefox中似乎什么都不起作用。这似乎是由于种族条件造成的,这使得调整大小有时会失败。在非常旧的SAPUI5版本中(使用现在不推荐使用的API),我只能重复几次失败。现在,这个问题已不再重复。以下是最新版本的示例:。由于这个问题不再是可复制的,我投票结束这个问题。