0

i got an issue in my smart table when i try the add button inside it, the form stay even after a event.confirm.reject(); see picture bellow:

enter image description here

the form, i'm talking about is framed into a red rectangle

here is my code:

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();
   }
}
Flow
  • 550
  • 1
  • 4
  • 12

1 Answers1

0

This is not a bug/error if you think so.

It doesn't close the add/edit-field, so that the user knows that the update/create didn't work/got canceled and can change the input data or close the add/edit-row himself.

Lumix
  • 311
  • 1
  • 5
  • thanks, i've found another way to do it, using some popup, but it explain a lot of things if it's a willing behaviour – Flow Dec 27 '17 at 15:34