mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-09 11:03:05 +00:00
Merged dynamic form module
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import { isEqual } from 'lodash';
|
||||
|
||||
export class FormFieldPreviousValueObject {
|
||||
|
||||
private _path;
|
||||
private _value;
|
||||
|
||||
constructor(path: any[] = null, value: any = null) {
|
||||
this._path = path;
|
||||
this._value = value;
|
||||
}
|
||||
|
||||
get path() {
|
||||
return this._path;
|
||||
}
|
||||
|
||||
set path(path: any[]) {
|
||||
this._path = path;
|
||||
}
|
||||
|
||||
get value() {
|
||||
return this._value;
|
||||
}
|
||||
|
||||
set value(value: any) {
|
||||
this._value = value;
|
||||
}
|
||||
|
||||
public delete() {
|
||||
this._value = null;
|
||||
this._path = null;
|
||||
}
|
||||
|
||||
public isPathEqual(path) {
|
||||
return this._path && isEqual(this._path, path);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user