From 140729b1d7a44793441b846e03d21234ee6e04b1 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 18 Apr 2023 08:51:00 +0100 Subject: [PATCH] Remove unused code and change selected table faster in data section --- .../TableNavigator/TableNavigator.svelte | 2 +- packages/frontend-core/src/fetch/DataFetch.js | 21 ------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte b/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte index 182ac49314..ebfd5f11a3 100644 --- a/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte +++ b/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte @@ -25,7 +25,7 @@ text={table.name} selected={$isActive("./table/:tableId") && $tables.selected?._id === table._id} - on:click={() => $goto(`./table/${table._id}`)} + on:click={() => tables.select(table._id)} > {#if table._id !== TableNames.USERS} diff --git a/packages/frontend-core/src/fetch/DataFetch.js b/packages/frontend-core/src/fetch/DataFetch.js index f7e1b856d4..f68b37dcca 100644 --- a/packages/frontend-core/src/fetch/DataFetch.js +++ b/packages/frontend-core/src/fetch/DataFetch.js @@ -372,27 +372,6 @@ export default class DataFetch { })) } - /** - * Refreshes the datasource's definition and schema - */ - async refreshDefinition() { - const { datasource } = this.options - - // Fetch datasource definition and determine feature flags - const definition = await this.getDefinition(datasource) - - // Fetch and enrich schema - let schema = this.getSchema(datasource, definition) - schema = this.enrichSchema(schema) - - // Update state - this.store.update(state => ({ - ...state, - definition, - schema, - })) - } - /** * Determines whether there is a next page of data based on the state of the * store