aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/EditableView.tsx
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-04-29 17:20:37 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-04-29 17:20:37 -0500
commit7b8651a1a1f824e6c6a5135a4420766686f35175 (patch)
treecc46e95c2fed79cdce12ad5d832017b5a0bf7e70 /src/client/views/EditableView.tsx
parent13b5c5554ce9169d39e84e708e147adcb3e9eb14 (diff)
parameters now editable and partial drag and drop
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r--src/client/views/EditableView.tsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx
index 2219966e5..f1fa71ad3 100644
--- a/src/client/views/EditableView.tsx
+++ b/src/client/views/EditableView.tsx
@@ -5,6 +5,7 @@ import * as Autosuggest from 'react-autosuggest';
import { ObjectField } from '../../new_fields/ObjectField';
import { SchemaHeaderField } from '../../new_fields/SchemaHeaderField';
import "./EditableView.scss";
+import { DragManager } from '../util/DragManager';
export interface EditableProps {
/**
@@ -49,6 +50,7 @@ export interface EditableProps {
HeadingsHack?: number;
toggle?: () => void;
color?: string | undefined;
+ onDrop?: any;
}
/**
@@ -79,6 +81,13 @@ export class EditableView extends React.Component<EditableProps> {
}
}
+ @action
+ componentDidMount() {
+ if (this._ref.current && this.props.onDrop) {
+ DragManager.MakeDropTarget(this._ref.current, this.props.onDrop.bind(this));
+ }
+ }
+
_didShow = false;
@action