Skip to content

Commit 6932757

Browse files
committed
Move filters above charts; disable buttons when loading
1 parent 24bc60c commit 6932757

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

desktop-app/src/components/ResultGrid.svelte

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,6 @@
243243
<Loading withOverlay={false} />
244244
</div>
245245
{:else}
246-
{#if charts && rows.length && !errorMessage}
247-
<div class="result-grid-charts" aria-label="Chart area" role="img">
248-
{@render charts(rows, columns)}
249-
</div>
250-
{/if}
251-
252246
<form
253247
class="result-grid__filters"
254248
class:result-grid__filters--with-time={enableTimeInput}
@@ -320,12 +314,27 @@
320314
<Loading withOverlay={false} small />
321315
</div>
322316
{/if}
323-
<Button kind="primary" size="small" type="submit">Apply</Button>
324-
<Button kind="secondary" size="small" type="reset">Clear</Button>
317+
<Button kind="primary" size="small" type="submit" disabled={isReloadingData}>
318+
{isReloadingData ? 'Loading...' : 'Apply'}
319+
</Button>
320+
<Button
321+
kind="secondary"
322+
size="small"
323+
type="reset"
324+
disabled={isReloadingData}
325+
>
326+
Clear
327+
</Button>
325328
</div>
326329
</div>
327330
</form>
328331

332+
{#if charts && rows.length && !errorMessage}
333+
<div class="result-grid-charts" aria-label="Chart area" role="img">
334+
{@render charts(rows, columns)}
335+
</div>
336+
{/if}
337+
329338
{#if errorMessage}
330339
<InlineNotification
331340
class="result-grid__error"

0 commit comments

Comments
 (0)