@@ -16,7 +16,7 @@ import decode from 'parse/lib/browser/decode';
1616import React from 'react' ;
1717import StringEditor from 'components/StringEditor/StringEditor.react' ;
1818
19- const Editor = ( { top, left, type, targetClass, value, readonly, width, onCommit, onCancel, setContextMenu, arrayConfigParams, onAddToArrayConfig } ) => {
19+ const Editor = ( { top, left, type, targetClass, value, readonly, width, onCommit, onCancel, setContextMenu, arrayConfigParams, onAddToArrayConfig, getRelatedRecordsMenuItem } ) => {
2020 let content = null ;
2121 if ( type === 'String' ) {
2222 content = (
@@ -31,6 +31,7 @@ const Editor = ({ top, left, type, targetClass, value, readonly, width, onCommit
3131 setContextMenu = { setContextMenu }
3232 arrayConfigParams = { arrayConfigParams }
3333 onAddToArrayConfig = { onAddToArrayConfig }
34+ getRelatedRecordsMenuItem = { getRelatedRecordsMenuItem }
3435 />
3536 ) ;
3637 } else if ( type === 'Array' || type === 'Object' ) {
@@ -53,6 +54,7 @@ const Editor = ({ top, left, type, targetClass, value, readonly, width, onCommit
5354 setContextMenu = { setContextMenu }
5455 arrayConfigParams = { arrayConfigParams }
5556 onAddToArrayConfig = { onAddToArrayConfig }
57+ getRelatedRecordsMenuItem = { getRelatedRecordsMenuItem }
5658 />
5759 ) ;
5860 } else if ( type === 'Polygon' ) {
@@ -95,6 +97,7 @@ const Editor = ({ top, left, type, targetClass, value, readonly, width, onCommit
9597 setContextMenu = { setContextMenu }
9698 arrayConfigParams = { arrayConfigParams }
9799 onAddToArrayConfig = { onAddToArrayConfig }
100+ getRelatedRecordsMenuItem = { getRelatedRecordsMenuItem }
98101 />
99102 ) ;
100103 } else if ( type === 'Date' ) {
@@ -109,6 +112,7 @@ const Editor = ({ top, left, type, targetClass, value, readonly, width, onCommit
109112 setContextMenu = { setContextMenu }
110113 arrayConfigParams = { arrayConfigParams }
111114 onAddToArrayConfig = { onAddToArrayConfig }
115+ getRelatedRecordsMenuItem = { getRelatedRecordsMenuItem }
112116 />
113117 ) ;
114118 } else {
@@ -137,7 +141,7 @@ const Editor = ({ top, left, type, targetClass, value, readonly, width, onCommit
137141 ) ;
138142 }
139143 } ;
140- content = < StringEditor value = { value ? value . id : '' } width = { width } onCommit = { encodeCommit } onCancel = { onCancel } setContextMenu = { setContextMenu } arrayConfigParams = { arrayConfigParams } onAddToArrayConfig = { onAddToArrayConfig } /> ;
144+ content = < StringEditor value = { value ? value . id : '' } width = { width } onCommit = { encodeCommit } onCancel = { onCancel } setContextMenu = { setContextMenu } arrayConfigParams = { arrayConfigParams } onAddToArrayConfig = { onAddToArrayConfig } getRelatedRecordsMenuItem = { getRelatedRecordsMenuItem } /> ;
141145 }
142146
143147 return < div style = { { position : 'absolute' , top : top , left : left } } > { content } </ div > ;
0 commit comments