File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,9 @@ export default function makeBaseModel(options: FeathersVuexOptions) {
200
200
get isRemovePending ( ) : boolean {
201
201
return this . getGetterWithId ( 'isRemovePendingById' ) as boolean
202
202
}
203
+ get isSavePending ( ) : boolean {
204
+ return this . getGetterWithId ( 'isSavePendingById' ) as boolean
205
+ }
203
206
get isPending ( ) : boolean {
204
207
return this . getGetterWithId ( 'isPendingById' ) as boolean
205
208
}
Original file line number Diff line number Diff line change @@ -126,10 +126,12 @@ export default function makeServiceGetters() {
126
126
isIdPatchPending . includes ( id ) ,
127
127
isRemovePendingById : ( { isIdRemovePending } : ServiceState ) => ( id : Id ) =>
128
128
isIdRemovePending . includes ( id ) ,
129
- isPendingById : ( state : ServiceState , getters ) => ( id : Id ) =>
129
+ isSavePendingById : ( state : ServiceState , getters ) => ( id : Id ) =>
130
130
getters . isCreatePendingById ( id ) ||
131
131
getters . isUpdatePendingById ( id ) ||
132
- getters . isPatchPendingById ( id ) ||
132
+ getters . isPatchPendingById ( id ) ,
133
+ isPendingById : ( state : ServiceState , getters ) => ( id : Id ) =>
134
+ getters . isSavePendingById ( id ) ||
133
135
getters . isRemovePendingById ( id )
134
136
}
135
137
}
Original file line number Diff line number Diff line change @@ -304,6 +304,10 @@ export interface Model {
304
304
* `Remove` is currently pending on this model
305
305
*/
306
306
readonly isRemovePending : boolean
307
+ /**
308
+ * Any of `create`, `update` or `patch` is currently pending on this model
309
+ */
310
+ readonly isSavePending : boolean
307
311
/**
308
312
* Any method is currently pending on this model
309
313
*/
You can’t perform that action at this time.
0 commit comments