<ng2-smart-table
[settings]="settings"
[source]="data"
(createConfirm)="create($event)"
></ng2-smart-table>
create(event: { newData: Object; source: DataSource; confirm: Deferred }) {
event.source.append(event.newData);
event.confirm.reject();
}
import { DataSource } from 'ng2-smart-table/lib/lib/data-source/data-source';
import { Deferred } from 'ng2-smart-table/lib/lib/helpers';
create(event: { newData: Object; source: DataSource; confirm: Deferred }) {
event.source.append(event.newData);
event.confirm.resolve.skipAdd = true;
event.confirm.resolve();
}