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 = ({
163
163
* This will be dynamic based on the type of report we are customizing.
164
164
*/
165
165
const createFieldVariableSuggestions = ( ) => {
166
- if ( ! schema ) {
166
+ if ( ! schema && ! fields ) {
167
167
return [ ] ;
168
168
}
169
169
if ( type == 'graph' || type == 'map' ) {
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export const NeoReport = ({
37
37
setFields = ( f ) => {
38
38
fields = f ;
39
39
} , // The callback to update the set of query fields after query execution.
40
- setSchema ,
40
+ setSchemaDispatch ,
41
41
setGlobalParameter = ( ) => { } , // callback to update global (dashboard) parameters.
42
42
getGlobalParameter = ( _ : string ) => {
43
43
return '' ;
@@ -69,6 +69,11 @@ export const NeoReport = ({
69
69
70
70
const debouncedRunCypherQuery = useCallback ( debounce ( runCypherQuery , RUN_QUERY_DELAY_MS ) , [ ] ) ;
71
71
72
+ const setSchema = ( id , schema ) => {
73
+ if ( type === 'graph' || type === 'map' ) {
74
+ setSchemaDispatch ( id , schema ) ;
75
+ }
76
+ } ;
72
77
const populateReport = ( debounced = true ) => {
73
78
// If this is a 'text-only' report, no queries are ran, instead we pass the input directly to the report.
74
79
const reportTypes = getReportTypes ( extensions ) ;
@@ -341,7 +346,7 @@ const mapDispatchToProps = (dispatch) => ({
341
346
getCustomDispatcher : ( ) => {
342
347
return dispatch ;
343
348
} ,
344
- setSchema : ( id : any , schema : any ) => {
349
+ setSchemaDispatch : ( id : any , schema : any ) => {
345
350
dispatch ( updateFieldsThunk ( id , schema , true ) ) ;
346
351
} ,
347
352
} ) ;
You can’t perform that action at this time.
0 commit comments