0

I am using ng2-smart-table for maintain data in my angular 6 app. As I seen in it's git and npm page. I have set my code like this way.

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

I am able to load data in table by call API. But when I am not able to get save data event. For that I have set function like this.

onCreateConfirm(event) {
   alert("Clicked...");
}

I have set this function under the ngOnInit.

khushboo
  • 715
  • 2
  • 11
  • 24

1 Answers1

0

It's a common issue, you need to set in the configuration object the confirmCreate property, like this:

export const settings= {
  delete: {
    confirmDelete: true,
    ...
  },
  add: {
    confirmCreate: true,
    ...
  },
  edit: {
    confirmSave: true,
    ...
  },
....
Slinker009
  • 105
  • 1
  • 9