From c3a6e13103062fff1e2e199b938bde065efff6c8 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 16 Aug 2021 09:44:15 +0100 Subject: [PATCH] Bug fix for unable to navigate from sql screen --- .../[selectedDatasource]/index.svelte | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte index b0377d2f27..0cd667a82e 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/index.svelte @@ -9,7 +9,6 @@ import ICONS from "components/backend/DatasourceNavigator/icons" import { capitalise } from "helpers" - let unsaved = false let relationshipModal let displayColumnModal let selectedFromRelationship, selectedToRelationship @@ -71,7 +70,6 @@ // Create datasource await datasources.save(datasource) notifications.success(`Datasource ${name} updated successfully.`) - unsaved = false } catch (err) { notifications.error(`Error saving datasource: ${err}`) } @@ -81,7 +79,6 @@ try { await datasources.updateSchema(datasource) notifications.success(`Datasource ${name} tables updated successfully.`) - unsaved = false await tables.fetch() } catch (err) { notifications.error(`Error updating datasource schema: ${err}`) @@ -98,10 +95,6 @@ $goto(`../../table/${table._id}`) } - function setUnsaved() { - unsaved = true - } - function openRelationshipModal(fromRelationship, toRelationship) { selectedFromRelationship = fromRelationship || {} selectedToRelationship = toRelationship || {} @@ -111,16 +104,6 @@ function openDisplayColumnModal() { displayColumnModal.show() } - - $beforeUrlChange(() => { - if (unsaved) { - notifications.error( - "Unsaved changes. Please save your datasource configuration before leaving." - ) - return false - } - return true - }) @@ -164,7 +147,6 @@ {#if datasource.plus}