当我们取消 windows 确认弹出窗口时,ng2-smartTable 添加表单不会关闭

ng2-smartTable add form doesn't close when we cancel the windows confirmation popup

我在 smart table 中遇到了一个问题,当我在其中尝试 add 按钮时,即使在 event.confirm.reject(); 之后表格仍然存在,请参见下面的图片:

我说的表格被框成一个红色矩形

这是我的代码:

component.html:

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

component.ts

 addFuction(event) {
   if (window.confirm('Are you sure you want to create?')) {
     event.newData['libelle'] += ' + added in code';
     event.confirm.resolve(event.newData);
   } else {
     console.log('test');
     event.confirm.reject();
   }
}

如果你这么认为,这不是bug/error。

不关闭add/edit-field,让用户知道update/create没有work/got取消,可以更改输入数据或关闭[=18] =]他自己。