Skip to content

Commit e54e1a8

Browse files
fix: trigger edit variables on first render (#1545)
1 parent 1bb7b0e commit e54e1a8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/graphiql/src/components/VariableEditor.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,14 @@ export class VariableEditor extends React.Component<VariableEditorProps> {
5151
editor: (CM.Editor & { options: any }) | null = null;
5252
cachedValue: string;
5353
private _node: HTMLElement | null = null;
54-
ignoreChangeEvent: boolean;
54+
ignoreChangeEvent: boolean = false;
5555
constructor(props: VariableEditorProps) {
5656
super(props);
5757

5858
// Keep a cached version of the value, this cache will be updated when the
5959
// editor is updated, which can later be used to protect the editor from
6060
// unnecessary updates during the update lifecycle.
6161
this.cachedValue = props.value || '';
62-
this.ignoreChangeEvent = true;
6362
}
6463

6564
componentDidMount() {

0 commit comments

Comments
 (0)