Skip to content

Commit 24bc60c

Browse files
committed
Rename loading variables for clarity
1 parent 011bf00 commit 24bc60c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

desktop-app/src/components/ResultGrid.svelte

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
2727
let { title, description, command, charts, children }: Props = $props();
2828
29-
let loading = $state(true);
30-
let hasLoaded = $state(false);
29+
let isReloadingData = $state(true);
30+
let hasInitiallyLoaded = $state(false);
3131
let errorMessage = $state('');
3232
let rows = $state<Array<Record<string, unknown>>>([]);
3333
let columns = $state<GridColumn[]>([]);
@@ -161,7 +161,7 @@
161161
}
162162
163163
async function loadData(filters: DateFilterState = appliedFilters) {
164-
loading = true;
164+
isReloadingData = true;
165165
errorMessage = '';
166166
try {
167167
const filterArgs = buildFilterArgs(filters);
@@ -175,8 +175,8 @@
175175
errorMessage = error instanceof Error ? error.message : String(error);
176176
}
177177
} finally {
178-
loading = false;
179-
hasLoaded = true;
178+
isReloadingData = false;
179+
hasInitiallyLoaded = true;
180180
}
181181
}
182182
@@ -238,7 +238,7 @@
238238
<p>{description}</p>
239239
</header>
240240

241-
{#if loading && !hasLoaded}
241+
{#if isReloadingData && !hasInitiallyLoaded}
242242
<div class="result-grid__loading">
243243
<Loading withOverlay={false} />
244244
</div>
@@ -315,7 +315,7 @@
315315
{/if}
316316
</div>
317317
<div class="result-grid__filters-actions">
318-
{#if loading && hasLoaded}
318+
{#if isReloadingData && hasInitiallyLoaded}
319319
<div class="result-grid__soft-loading" aria-live="polite">
320320
<Loading withOverlay={false} small />
321321
</div>

0 commit comments

Comments
 (0)