From f38d2de249ddf2cad533e2f92197738835688a73 Mon Sep 17 00:00:00 2001 From: bob Date: Fri, 10 May 2019 11:54:33 -0400 Subject: fixed dragging search results. --- src/client/views/SearchItem.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/client/views/SearchItem.tsx') diff --git a/src/client/views/SearchItem.tsx b/src/client/views/SearchItem.tsx index d30579907..0da0bdae8 100644 --- a/src/client/views/SearchItem.tsx +++ b/src/client/views/SearchItem.tsx @@ -8,6 +8,7 @@ import { Cast } from "../../new_fields/Types"; import { FieldView, FieldViewProps } from './nodes/FieldView'; import { computed } from "mobx"; import { IconField } from "../../new_fields/IconField"; +import { SetupDrag } from "../util/DragManager"; export interface SearchProps { @@ -40,9 +41,19 @@ export class SearchItem extends React.Component { return ; } + collectionRef = React.createRef(); + startDocDrag = () => { + let doc = this.props.doc; + const isProto = Doc.GetT(doc, "isPrototype", "boolean", true); + if (isProto) { + return Doc.MakeDelegate(doc); + } else { + return Doc.MakeAlias(doc); + } + } render() { return ( -
+
title: {this.props.doc.title}
{/*
Type: {this.props.doc.layout}
*/} {/*
{SearchItem.DocumentIcon(this.layout)}
*/} -- cgit v1.2.3-70-g09d2