I'm encountering an issue with my smart table
when attempting to use the add
button within it. Despite calling event.confirm.reject();
, the form remains visible as shown in the image below:
https://i.sstatic.net/3ojl6.png
The form, enclosed in a red rectangle, is the one causing the problem.
Below is the code snippet:
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();
}
}