javascript - 在 SAPUI5 中,您可以通过单击按钮触发 Smart Table 事件吗?
问题描述
我想使用智能表的内置编辑功能,但我想从我放置在溢出工具栏中的按钮触发它。
这是我要触发的事件,https://sapui5.hana.ondemand.com/#/api/sap.ui.comp.smarttable.SmartTable/events/editToggled
像这样的东西:
onEditPromotionsPressed: function(){
this.editToggled();
},
但editToggled
在我的控制器中未被识别为功能。我需要将智能表控件添加到控制器中吗?
解决方案
您可以使用下面的此功能从不同的按钮按下调用智能表切换
火编辑切换
例子:
//Other button to call edit function
onEditPromotionsPressed: function(){
this.fireEditToggled();
},
on smarttable controller you need to specify function for editToggled event and this will be called through fireEditToggled()
推荐阅读
- python - 在 AWS lambda 函数中获取日志两次
- angular - 从 Angular 应用程序中的 HttpErrorResponse 获取错误消息
- javascript - React 16.4 允许从状态更改中调用 getDerivedStateFromProps。如何应对?
- couchbase - Couchbase 系统日志启用配置
- python - 在 skimage 中使用标签和 regionprops 时出错,
- android - Android - 如何定义备份内容规则以仅包含共享首选项
- performance - 实施密集型简单报告的最佳解决方案
- ios - Xamarin iOS 设置 NavigationController.NavigationBar.Translucent = true; 将滚动视图内容向上移动
- javascript - MAGENTO 2 Prototype.js 每个
- javascript - 量角器,无法从会话存储中获取正确的数据