@@ -438,6 +438,7 @@ type QueryEditorComponent = (props: {
438438 showAlias ?: boolean ;
439439 discourseNodeType ?: string ;
440440 settingKey ?: "index" | "specification" ;
441+ returnNode ?: string ;
441442} ) => JSX . Element ;
442443
443444const QueryEditor : QueryEditorComponent = ( {
@@ -448,6 +449,7 @@ const QueryEditor: QueryEditorComponent = ({
448449 showAlias,
449450 discourseNodeType,
450451 settingKey,
452+ returnNode,
451453} ) => {
452454 useEffect ( ( ) => {
453455 const previewQuery = ( ( e : CustomEvent ) => {
@@ -493,7 +495,7 @@ const QueryEditor: QueryEditorComponent = ({
493495
494496 const stripped : unknown = JSON . parse (
495497 JSON . stringify (
496- { conditions, selections, custom } ,
498+ { conditions, selections, custom, returnNode } ,
497499 ( key , value : unknown ) => ( key === "uid" ? undefined : value ) ,
498500 ) ,
499501 ) ;
@@ -507,7 +509,8 @@ const QueryEditor: QueryEditorComponent = ({
507509 return ;
508510 }
509511
510- const path = settingKey === "index" ? [ "index" ] : [ "specification" , "query" ] ;
512+ const path =
513+ settingKey === "index" ? [ "index" ] : [ "specification" , "query" ] ;
511514
512515 window . clearTimeout ( blockPropSyncTimeoutRef . current ) ;
513516 blockPropSyncTimeoutRef . current = window . setTimeout ( ( ) => {
@@ -516,7 +519,14 @@ const QueryEditor: QueryEditorComponent = ({
516519 } , 250 ) ;
517520
518521 return ( ) => window . clearTimeout ( blockPropSyncTimeoutRef . current ) ;
519- } , [ conditions , selections , custom , discourseNodeType , settingKey ] ) ;
522+ } , [
523+ conditions ,
524+ selections ,
525+ custom ,
526+ discourseNodeType ,
527+ settingKey ,
528+ returnNode ,
529+ ] ) ;
520530
521531 const customNodeOnChange = ( value : string ) => {
522532 window . clearTimeout ( debounceRef . current ) ;
0 commit comments