Skip to content

Commit 7a4bb08

Browse files
authored
fix: force recalc of component size (#4917)
1 parent e90e779 commit 7a4bb08

File tree

3 files changed

+31
-15
lines changed

3 files changed

+31
-15
lines changed

src/dataExplorer/components/Results.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ $cf-radius-lg: $cf-radius + 4px;
44

55
.data-explorer-results {
66
height: 100%;
7+
width: 100%;
8+
position: absolute;
79
border-radius: $cf-radius-lg;
810
border: 2px solid transparent;
911
background-color: $cf-grey-15;
@@ -39,6 +41,18 @@ $cf-radius-lg: $cf-radius + 4px;
3941
}
4042
}
4143

44+
.data-explorer--monaco-outer {
45+
flex-grow: 1;
46+
position: relative;
47+
width: 100%;
48+
}
49+
50+
.data-explorer--monaco-wrap {
51+
position: absolute;
52+
width: 100%;
53+
height: 100%;
54+
}
55+
4256
.query-stat {
4357
padding: $cf-space-2xs 0;
4458
}

src/dataExplorer/components/ResultsPane.tsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,21 +145,23 @@ const ResultsPane: FC = () => {
145145
margin={ComponentSize.Small}
146146
style={{height: '100%'}}
147147
>
148-
<div style={{height: '100%', width: '100%', position: 'relative'}}>
149-
<Suspense
150-
fallback={
151-
<SpinnerContainer
152-
loading={RemoteDataState.Loading}
153-
spinnerComponent={<TechnoSpinner />}
148+
<div className="data-explorer--monaco-outer">
149+
<div className="data-explorer--monaco-wrap">
150+
<Suspense
151+
fallback={
152+
<SpinnerContainer
153+
loading={RemoteDataState.Loading}
154+
spinnerComponent={<TechnoSpinner />}
155+
/>
156+
}
157+
>
158+
<FluxMonacoEditor
159+
variables={variables}
160+
script={text}
161+
onChangeScript={setText}
154162
/>
155-
}
156-
>
157-
<FluxMonacoEditor
158-
variables={variables}
159-
script={text}
160-
onChangeScript={setText}
161-
/>
162-
</Suspense>
163+
</Suspense>
164+
</div>
163165
</div>
164166
<div style={{width: '100%'}}>
165167
<FlexBox

src/timeMachine/components/TimeMachineFluxEditor.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424

2525
.flux-editor--monaco {
26-
position: relative;
26+
position: absolute;
2727
width: 100%;
2828
height: 100%;
2929

0 commit comments

Comments
 (0)