diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-05-02 14:31:16 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-05-02 14:31:16 -0400 |
| commit | 100ad0da00f2a5cea13508abc0c3a8c644095d65 (patch) | |
| tree | cd7a5e40e8d3b5f0ffb5b70fdef1be37ef975a0d /src/client/views/collections/CollectionView.tsx | |
| parent | 952bc0d744833ab79f69f2f13abde1e4cee68408 (diff) | |
turn off targetDropAction when dropping in same colleciton. cleaned up PresBox stuff to use single template to render all contents (which are otherwise unmodified).
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionView.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx index d2afb4855..cb7d86e00 100644 --- a/src/client/views/collections/CollectionView.tsx +++ b/src/client/views/collections/CollectionView.tsx @@ -74,6 +74,7 @@ export enum CollectionViewType { export interface CollectionViewCustomProps { filterAddDocument: (doc: Doc) => boolean; // allows a document that renders a Collection view to filter or modify any documents added to the collection (see PresBox for an example) childLayoutTemplate?: () => Opt<Doc>; // specify a layout Doc template to use for children of the collection + childLayoutString?: string; // specify a layout string to use for children of the collection } export interface CollectionRenderProps { @@ -478,6 +479,7 @@ export class CollectionView extends Touchable<FieldViewProps & CollectionViewCus </div>; } childLayoutTemplate = () => this.props.childLayoutTemplate?.() || Cast(this.props.Document.childLayoutTemplate, Doc, null); + childLayoutString = this.props.childLayoutString || StrCast(this.props.Document.childLayoutString); render() { TraceMobx(); @@ -489,7 +491,7 @@ export class CollectionView extends Touchable<FieldViewProps & CollectionViewCus whenActiveChanged: this.whenActiveChanged, PanelWidth: this.bodyPanelWidth, ChildLayoutTemplate: this.childLayoutTemplate, - ChildLayoutString: StrCast(this.props.Document.childLayoutString), + ChildLayoutString: this.childLayoutString, }; return (<div className={"collectionView"} style={{ |
