Skip to content

Commit

Permalink
Fix loading spinner logic
Browse files Browse the repository at this point in the history
  • Loading branch information
seancolsen committed Feb 4, 2025
1 parent 0b90242 commit 36e8080
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mathesar_ui/src/pages/record/TableWidget.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

<div class="results">
{#if canViewTable}
<TableView context="widget" showLoadingSpinner={false} {table} />
<TableView context="widget" {table} />
{:else}
<WarningBox fullWidth>
{$_('no_privileges_view_table')}
Expand Down
10 changes: 4 additions & 6 deletions mathesar_ui/src/systems/table-view/TableView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
export let context: Context = 'page';
export let table: Table;
export let sheetElement: HTMLElement | undefined = undefined;
export let showLoadingSpinner = true;
let tableInspectorTab: ComponentProps<WithTableInspector>['activeTabId'] =
'table';
Expand Down Expand Up @@ -85,11 +84,6 @@
bind:activeTabId={tableInspectorTab}
>
<div class="sheet-area">
{#if $isLoading && showLoadingSpinner}
<div class="loading-sheet">
<Spinner />
</div>
{/if}
{#if $processedColumns.size}
<Sheet
{clipboardHandler}
Expand All @@ -116,6 +110,10 @@
<Header {hasNewColumnButton} {columnOrder} {table} />
<Body {usesVirtualList} />
</Sheet>
{:else if $isLoading}
<div class="loading-sheet">
<Spinner />
</div>
{/if}
</div>
</WithTableInspector>
Expand Down

0 comments on commit 36e8080

Please sign in to comment.