mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
fixed patch move
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Store } from '@ngrx/store';
|
||||
import { CoreState } from '../../core.reducers';
|
||||
import {
|
||||
NewPatchAddOperationAction,
|
||||
NewPatchAddOperationAction, NewPatchMoveOperationAction,
|
||||
NewPatchRemoveOperationAction,
|
||||
NewPatchReplaceOperationAction
|
||||
} from '../json-patch-operations.actions';
|
||||
@@ -61,6 +61,18 @@ export class JsonPatchOperationsBuilder {
|
||||
this.prepareValue(value, plain, false)));
|
||||
}
|
||||
|
||||
|
||||
move(path: JsonPatchOperationPathObject, prevPath: string) {
|
||||
this.store.dispatch(
|
||||
new NewPatchMoveOperationAction(
|
||||
path.rootElement,
|
||||
path.subRootElement,
|
||||
prevPath,
|
||||
path.path
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispatches a new NewPatchRemoveOperationAction
|
||||
*
|
||||
|
Reference in New Issue
Block a user