Skip to content

Commit

Permalink
database store to have done as initial state
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatvijay committed Oct 5, 2023
1 parent d4b4813 commit 810f49f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
let filterQuery = '';
$: isPreloaded = $databases.preload;
$: allDatabases = $databases.data;
$: databasesLoadStatus = $databases.state;
$: databasesLoadError = $databases.error;
Expand Down Expand Up @@ -70,9 +69,9 @@
<h1>Database Connections {filteredDatabasesCountText}</h1>

<section class="connections-list-container">
{#if databasesLoadStatus === States.Loading && !isPreloaded}
{#if databasesLoadStatus === States.Loading}
<DatabaseConnectionSkeleton />
{:else if databasesLoadStatus === States.Done || isPreloaded}
{:else if databasesLoadStatus === States.Done}
<EntityContainerWithFilterBar
searchPlaceholder="Search Database Connections"
bind:searchQuery={filterQuery}
Expand Down
2 changes: 1 addition & 1 deletion mathesar_ui/src/stores/databases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface DatabaseStoreData {

export const databases = writable<DatabaseStoreData>({
preload: true,
state: States.Loading,
state: States.Done,
data: commonData?.databases ?? [],
});

Expand Down

0 comments on commit 810f49f

Please sign in to comment.