diff options
Diffstat (limited to 'src/new_fields/List.ts')
-rw-r--r-- | src/new_fields/List.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/new_fields/List.ts b/src/new_fields/List.ts index ec1bf44a9..c1bd15cd1 100644 --- a/src/new_fields/List.ts +++ b/src/new_fields/List.ts @@ -3,7 +3,7 @@ import { Field, Update, Self } from "./Doc"; import { setter, getter, deleteProperty } from "./util"; import { serializable, alias, list } from "serializr"; import { observable, observe, IArrayChange, IArraySplice, IObservableArray, Lambda, reaction } from "mobx"; -import { ObjectField, OnUpdate } from "./ObjectField"; +import { ObjectField, OnUpdate, Copy } from "./ObjectField"; import { RefField } from "./RefField"; import { ProxyField } from "./Proxy"; @@ -215,6 +215,10 @@ class ListImpl<T extends Field> extends ObjectField { this.___fields = value; } + [Copy]() { + return new ListImpl<T>(); + } + // @serializable(alias("fields", list(autoObject()))) @observable private ___fields: (T | null | undefined)[]; |