ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

UI5 table的三种工作模式:VisibleRowCountMode, Fixed, Auto和Interactive

2019-08-24 09:05:40  阅读:546  来源: 互联网

标签:rows Auto records Fixed UI5 mode table property


Background

This issue is written for Li Ke’s issue on CBA customer report support.
When creating instance of sap.ui.Table instance, you can specify three different kinds of RowCountMode:

Fixed mode

In the runtime, the number of visible row in UI is ONLY determined by property VisibleRowCount.
For example I have 100 records but VisibleRowCount set as 2,

If you use this mode, best practice is to bind the property VisibleRowCountMode to the length property of your OData/JSON model.

Auto mode

In this mode, the height of the container which holds the table instance will be automatically set according to your actual data records volume. In this mode, do not bind VisibleRowCount property.
For example if I have 100 records:

If I have 1 record: ( compare the difference with Fixed mode )

Interactive mode

Almost the same as Fixed model, except the fact that customer can drag the grip to make more rows displayed, this is what “Interactive” means.
See this video for detail.
Why my Auto mode does not work? I only see 5 rows although I have far more records than that. I expect more table rows are displayed instead of 5 rows.
Logic: The number of visible rows is determined by table parent container’s height.

If no height of parent container is identified, the number of visible rows is property MiniAutoRowCount. If this property is not specified by developer either, default and hard coded 5 is used.

See this stackoverflow question for more detail: http://stackoverflow.com/questions/22510073/sap-ui-table-table-visiblerowcountmode-auto-mode-does-not-work
and this SCN question: https://scn.sap.com/thread/3395286
Tested on this UI5 version:

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

标签:rows,Auto,records,Fixed,UI5,mode,table,property
来源: https://blog.csdn.net/i042416/article/details/100048661

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有