feat: synchronize input/output variables in the panel with generated code by the code generator (#10150)
This commit is contained in:
parent
fafa5938da
commit
f674de4f5d
5 changed files with 442 additions and 8 deletions
|
|
@ -31,6 +31,7 @@ export type Props = {
|
|||
noWrapper?: boolean
|
||||
isExpand?: boolean
|
||||
showFileList?: boolean
|
||||
onGenerated?: (value: string) => void
|
||||
showCodeGenerator?: boolean
|
||||
}
|
||||
|
||||
|
|
@ -64,6 +65,7 @@ const CodeEditor: FC<Props> = ({
|
|||
noWrapper,
|
||||
isExpand,
|
||||
showFileList,
|
||||
onGenerated,
|
||||
showCodeGenerator = false,
|
||||
}) => {
|
||||
const [isFocus, setIsFocus] = React.useState(false)
|
||||
|
|
@ -151,9 +153,6 @@ const CodeEditor: FC<Props> = ({
|
|||
|
||||
return isFocus ? 'focus-theme' : 'blur-theme'
|
||||
})()
|
||||
const handleGenerated = (code: string) => {
|
||||
handleEditorChange(code)
|
||||
}
|
||||
|
||||
const main = (
|
||||
<>
|
||||
|
|
@ -205,7 +204,7 @@ const CodeEditor: FC<Props> = ({
|
|||
isFocus={isFocus && !readOnly}
|
||||
minHeight={minHeight}
|
||||
isInNode={isInNode}
|
||||
onGenerated={handleGenerated}
|
||||
onGenerated={onGenerated}
|
||||
codeLanguages={language}
|
||||
fileList={fileList}
|
||||
showFileList={showFileList}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue