File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
projects/fusio-sdk/src/lib/abstract Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ export abstract class Form<T> implements OnInit {
47
47
async doCreate ( entity : T ) {
48
48
try {
49
49
this . response = await this . getService ( ) . create ( entity ) ;
50
+
51
+ this . onSubmit ( ) ;
50
52
} catch ( error ) {
51
53
this . response = this . error . convert ( error ) ;
52
54
}
@@ -55,6 +57,8 @@ export abstract class Form<T> implements OnInit {
55
57
async doUpdate ( entity : T ) {
56
58
try {
57
59
this . response = await this . getService ( ) . update ( entity ) ;
60
+
61
+ this . onSubmit ( ) ;
58
62
} catch ( error ) {
59
63
this . response = this . error . convert ( error ) ;
60
64
}
@@ -63,6 +67,8 @@ export abstract class Form<T> implements OnInit {
63
67
async doDelete ( entity : T ) {
64
68
try {
65
69
this . response = await this . getService ( ) . delete ( entity ) ;
70
+
71
+ this . onSubmit ( ) ;
66
72
} catch ( error ) {
67
73
this . response = this . error . convert ( error ) ;
68
74
}
@@ -78,6 +84,10 @@ export abstract class Form<T> implements OnInit {
78
84
protected onLoad ( ) : void
79
85
{
80
86
}
87
+
88
+ protected onSubmit ( ) : void
89
+ {
90
+ }
81
91
}
82
92
83
93
export enum Mode {
You can’t perform that action at this time.
0 commit comments