Skip to content

Commit 78340e2

Browse files
authored
feat: add hotkey for rerunning a query (#5678)
1 parent ac16acb commit 78340e2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/dataExplorer/components/ResultsPane.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ import {getWindowPeriodVariableFromVariables} from 'src/variables/utils/getWindo
4141
// Constants
4242
import {TIME_RANGE_START, TIME_RANGE_STOP} from 'src/variables/constants'
4343

44-
const FluxMonacoEditor = lazy(() =>
45-
import('src/shared/components/FluxMonacoEditor')
44+
const FluxMonacoEditor = lazy(
45+
() => import('src/shared/components/FluxMonacoEditor')
4646
)
4747

4848
const fakeNotify = notify
@@ -101,7 +101,7 @@ const ResultsPane: FC = () => {
101101
event('CSV Download Initiated')
102102
basic(text, {
103103
vars: rangeToParam(range),
104-
}).promise.then(response => {
104+
}).promise.then((response) => {
105105
if (response.type !== 'SUCCESS') {
106106
return
107107
}
@@ -115,14 +115,14 @@ const ResultsPane: FC = () => {
115115
query(text, {
116116
vars: rangeToParam(range),
117117
})
118-
.then(r => {
118+
.then((r) => {
119119
event('resultReceived', {
120120
status: r.parsed.table.length === 0 ? 'empty' : 'good',
121121
})
122122
setResult(r)
123123
setStatus(RemoteDataState.Done)
124124
})
125-
.catch(e => {
125+
.catch((e) => {
126126
setResult({
127127
source: text,
128128
parsed: null,
@@ -169,6 +169,7 @@ const ResultsPane: FC = () => {
169169
variables={variables}
170170
script={text}
171171
onChangeScript={setQuery}
172+
onSubmitScript={submit}
172173
/>
173174
</Suspense>
174175
</div>

0 commit comments

Comments
 (0)