File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ export const NeoCustomReportStyleModal = ({
163163 * This will be dynamic based on the type of report we are customizing.
164164 */
165165 const createFieldVariableSuggestions = ( ) => {
166- if ( ! schema ) {
166+ if ( ! schema && ! fields ) {
167167 return [ ] ;
168168 }
169169 if ( type == 'graph' || type == 'map' ) {
Original file line number Diff line number Diff line change @@ -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,11 @@ 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+ }
76+ } ;
7277 const populateReport = ( debounced = true ) => {
7378 // If this is a 'text-only' report, no queries are ran, instead we pass the input directly to the report.
7479 const reportTypes = getReportTypes ( extensions ) ;
@@ -341,7 +346,7 @@ const mapDispatchToProps = (dispatch) => ({
341346 getCustomDispatcher : ( ) => {
342347 return dispatch ;
343348 } ,
344- setSchema : ( id : any , schema : any ) => {
349+ setSchemaDispatch : ( id : any , schema : any ) => {
345350 dispatch ( updateFieldsThunk ( id , schema , true ) ) ;
346351 } ,
347352} ) ;
You can’t perform that action at this time.
0 commit comments