Skip to content

Commit 8d48036

Browse files
committed
fix model builder
1 parent 4eac538 commit 8d48036

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/tdb-dashboard/src/components/JSONModelBuilder.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {CopyButton} from "./utils"
1919
import {BsSave} from "react-icons/bs"
2020

2121
export const JSONModelBuilder = ({tab,saveGraph,accessControlEditMode}) => {
22-
const {getSchemaGraph} = GraphContextObj();
22+
const {getSchemaGraph,mainGraphObj} = GraphContextObj();
2323
const {dataProduct} = WOQLClientObj()
2424
const [loading, setLoading] = useState(false)
2525
const [error, setError] = useState(false)
@@ -47,7 +47,7 @@ export const JSONModelBuilder = ({tab,saveGraph,accessControlEditMode}) => {
4747
if(tab == GRAPH_TAB) return
4848
setEditMode(false)
4949
getJSONSchema()
50-
}, [tab,dataProduct])
50+
}, [tab,dataProduct,mainGraphObj])
5151

5252
const [editMode, setEditMode]=useState(false)
5353
const [value, setValue]=useState(false)
@@ -124,7 +124,7 @@ export const JSONModelBuilder = ({tab,saveGraph,accessControlEditMode}) => {
124124
const editorValue =editor.doc.getValue()
125125
onBlurHandler(editorValue)
126126
}}
127-
value={jsonSchema}
127+
value={value}
128128
options={MODEL_BUILDER_EDITOR_OPTIONS}
129129
className="model-builder-code-mirror"
130130
/>

0 commit comments

Comments
 (0)