diff options
| author | bob <bcz@cs.brown.edu> | 2019-08-27 15:52:25 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-08-27 15:52:25 -0400 |
| commit | 656a08a130124870c9f652f7b1529b2b496cdac7 (patch) | |
| tree | 82243f21c9e2721baedfd8da4e67977a25e8c49d /src/client/views/collections/CollectionViewChromes.tsx | |
| parent | 34e0b1cf34474ec6765e212b6a35defefbfb49c9 (diff) | |
lint fixes.
Diffstat (limited to 'src/client/views/collections/CollectionViewChromes.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionViewChromes.tsx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionViewChromes.tsx b/src/client/views/collections/CollectionViewChromes.tsx index b2df0e747..4b3f7c87e 100644 --- a/src/client/views/collections/CollectionViewChromes.tsx +++ b/src/client/views/collections/CollectionViewChromes.tsx @@ -42,11 +42,13 @@ export class CollectionViewBaseChrome extends React.Component<CollectionViewChro _templateCommand = { title: "set template", script: "this.target.childLayout = this.source ? this.source[0] : undefined", params: ["target", "source"], + initialize: emptyFunction, immediate: (draggedDocs: Doc[]) => this.props.CollectionView.props.Document.childLayout = draggedDocs.length ? draggedDocs[0] : undefined }; _contentCommand = { // title: "set content", script: "getProto(this.target).data = aliasDocs(this.source.map(async p => await p));", params: ["target", "source"], // bcz: doesn't look like we can do async stuff in scripting... title: "set content", script: "getProto(this.target).data = aliasDocs(this.source);", params: ["target", "source"], + initialize: emptyFunction, immediate: (draggedDocs: Doc[]) => Doc.GetProto(this.props.CollectionView.props.Document).data = new List<Doc>(draggedDocs.map((d: any) => Doc.MakeAlias(d))) }; _viewCommand = { |
