ng2-smart-table订阅编辑

问题描述 投票:0回答:1

我想管理我的ng2-smart-table的编辑功能,但这段代码对我不起作用,我有什么问题?

HTML

<ng2-smart-table [settings]="settings" [source]="source" (edit)="onEdit($event)"></ng2-smart-table>

零件

onEdit(event:any):void{
console.log("edit model");}

我可以添加新按钮并管理您的行为,如果我可以订阅该活动以及如何操作,我想知道

typescript ng2-smart-table
1个回答
1
投票

这是因为ng2-smart-table需要在其设置中修改模式值

settings = {
actions: {
  columnTitle: 'Actions'
},
mode: 'external',
© www.soinside.com 2019 - 2024. All rights reserved.