@@ -37,7 +37,7 @@ export const NeoReport = ({
3737 setFields = ( f ) => {
3838 fields = f ;
3939 } , // The callback to update the set of query fields after query execution.
40- setSchema ,
40+ setSchemaDispatch ,
4141 setGlobalParameter = ( ) => { } , // callback to update global (dashboard) parameters.
4242 getGlobalParameter = ( _ : string ) => {
4343 return '' ;
@@ -69,6 +69,13 @@ export const NeoReport = ({
6969
7070 const debouncedRunCypherQuery = useCallback ( debounce ( runCypherQuery , RUN_QUERY_DELAY_MS ) , [ ] ) ;
7171
72+ const setSchema = ( id , schema ) => {
73+ if ( type === 'graph' || type === 'map' ) {
74+ setSchemaDispatch ( id , schema ) ;
75+ } else {
76+ console . log ( 'Not a valid report type for Schema' ) ;
77+ }
78+ } ;
7279 const populateReport = ( debounced = true ) => {
7380 // If this is a 'text-only' report, no queries are ran, instead we pass the input directly to the report.
7481 const reportTypes = getReportTypes ( extensions ) ;
@@ -341,7 +348,7 @@ const mapDispatchToProps = (dispatch) => ({
341348 getCustomDispatcher : ( ) => {
342349 return dispatch ;
343350 } ,
344- setSchema : ( id : any , schema : any ) => {
351+ setSchemaDispatch : ( id : any , schema : any ) => {
345352 dispatch ( updateFieldsThunk ( id , schema , true ) ) ;
346353 } ,
347354} ) ;
0 commit comments