Skip to content

Commit a6eb2a9

Browse files
committed
[Fix]: #1849 key error
1 parent 49370f9 commit a6eb2a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client/packages/lowcoder/src/comps/controls/codeControl.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ export function codeControl<
189189
const cardContent = params.disableCard
190190
? ""
191191
: getCardContent(this.unevaledValue, this.valueAndMsg, codeControlParams);
192+
const { key, ...restParams } = params;
192193
return (
193194
<EditorContext.Consumer>
194195
{(editorState) => (
@@ -197,7 +198,8 @@ export function codeControl<
197198
<>
198199
<Suspense fallback={null}>
199200
<CodeEditor
200-
{...params}
201+
key={key}
202+
{...restParams}
201203
bordered
202204
value={this.unevaledValue}
203205
codeType={codeType}

0 commit comments

Comments
 (0)