Skip to content

Commit 55b3e0c

Browse files
committed
Fix heights and properly chain handlers
1 parent b10178a commit 55b3e0c

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

src/components/interactive-code-block/mini-graphiQL.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default class MiniGraphiQL extends Component<
7878

7979
render() {
8080
const editor = (
81-
<div className="flex flex-col">
81+
<div className="flex flex-1 flex-col">
8282
<CodeBlockLabel
8383
text="Operation"
8484
className="border-b border-neu-200 bg-[--cm-background] dark:border-neu-50"
@@ -101,7 +101,7 @@ export default class MiniGraphiQL extends Component<
101101
<div className="flex flex-col border-neu-200 dark:border-neu-50">
102102
<CodeBlockLabel
103103
text="Variables"
104-
className="border-b border-neu-200 bg-[--cm-background] dark:border-neu-50"
104+
className="border-y border-neu-200 bg-[--cm-background] dark:border-neu-50"
105105
/>
106106
<VariableEditor
107107
value={this.state.variables}
@@ -177,11 +177,14 @@ export default class MiniGraphiQL extends Component<
177177
}
178178

179179
_handleEditQuery(value: string) {
180-
this.setState({ query: value })
181-
void this._runQuery({ manual: false })
180+
this.setState({ query: value }, () => {
181+
void this._runQuery({ manual: false })
182+
})
182183
}
183184

184185
_handleEditVariables(value: string) {
185-
this.setState({ variables: value })
186+
this.setState({ variables: value }, () => {
187+
void this._runQuery({ manual: false })
188+
})
186189
}
187190
}

src/components/interactive-code-block/query-editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export class QueryEditor extends Component<QueryEditorProps> {
140140
render() {
141141
return (
142142
<div
143-
className="query-editor flex flex-col [&>:last-child]:basis-full"
143+
className="query-editor flex h-full flex-col [&>:last-child]:basis-full"
144144
ref={e => {
145145
this.domNode = e
146146
}}

src/components/interactive-code-block/result-viewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class ResultViewer extends Component<ResultViewerProps> {
7171
render() {
7272
return (
7373
<div
74-
className="result-window"
74+
className="result-window h-full"
7575
ref={e => {
7676
this.domNode = e
7777
}}

src/components/interactive-code-block/variable-editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class VariableEditor extends Component<VariableEditorProps> {
103103
render() {
104104
return (
105105
<div
106-
className="variable-editor"
106+
className="variable-editor h-full"
107107
ref={e => {
108108
this.domNode = e
109109
}}

0 commit comments

Comments
 (0)