You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ly...@apache.org on 2023/01/05 20:56:07 UTC

[superset] branch lyndsi/enable-dataset-creation updated: Create dataset returns user to dataset list

This is an automated email from the ASF dual-hosted git repository.

lyndsi pushed a commit to branch lyndsi/enable-dataset-creation
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/lyndsi/enable-dataset-creation by this push:
     new 97da07da83 Create dataset returns user to dataset list
97da07da83 is described below

commit 97da07da830bcf44f44885cf37efbb790ee8f975
Author: lyndsiWilliams <kc...@gmail.com>
AuthorDate: Thu Jan 5 14:53:22 2023 -0600

    Create dataset returns user to dataset list
---
 .../src/views/CRUD/data/dataset/AddDataset/Footer/index.tsx         | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/index.tsx
index 25bbeb780f..81404b9365 100644
--- a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/index.tsx
+++ b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/index.tsx
@@ -73,7 +73,6 @@ function Footer({
 
     return LOG_ACTIONS[value];
   };
-  const goToPreviousUrl = () => history.goBack();
 
   const cancelButtonOnClick = () => {
     if (!datasetObject) {
@@ -82,7 +81,7 @@ function Footer({
       const logAction = createLogAction(datasetObject);
       logEvent(logAction, datasetObject);
     }
-    goToPreviousUrl();
+    history.goBack();
   };
 
   const tooltipText = t('Select a database table.');
@@ -101,7 +100,8 @@ function Footer({
         if (typeof response === 'number') {
           logEvent(LOG_ACTIONS_DATASET_CREATION_SUCCESS, datasetObject);
           // When a dataset is created the response we get is its ID number
-          goToPreviousUrl();
+          window.location.href =
+            '/tablemodelview/list/?pageIndex=0&sortColumn=changed_on_delta_humanized&sortOrder=desc';
         }
       });
     }