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

enzomartellucci pushed a commit to branch enxdev/fix/dataset-cration-flow
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 85f9fc110ee8daf1f3b47d36dd1c6810c239f3e5
Author: Enzo Martellucci <[email protected]>
AuthorDate: Wed Dec 24 17:54:02 2025 +0100

    fix(chart-creation): use exact match when loading dataset from URL parameter
---
 superset-frontend/src/pages/ChartCreation/index.tsx | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/superset-frontend/src/pages/ChartCreation/index.tsx 
b/superset-frontend/src/pages/ChartCreation/index.tsx
index 118c78c3b7..b372d6426b 100644
--- a/superset-frontend/src/pages/ChartCreation/index.tsx
+++ b/superset-frontend/src/pages/ChartCreation/index.tsx
@@ -191,7 +191,7 @@ export class ChartCreation extends PureComponent<
   componentDidMount() {
     const params = new URLSearchParams(window.location.search).get('dataset');
     if (params) {
-      this.loadDatasources(params, 0, 1).then(r => {
+      this.loadDatasources(params, 0, 1, true).then(r => {
         const datasource = r.data[0];
         this.setState({ datasource });
       });
@@ -230,7 +230,12 @@ export class ChartCreation extends PureComponent<
     }
   }
 
-  loadDatasources(search: string, page: number, pageSize: number) {
+  loadDatasources(
+    search: string,
+    page: number,
+    pageSize: number,
+    exactMatch = false,
+  ) {
     const query = rison.encode({
       columns: [
         'id',
@@ -239,7 +244,9 @@ export class ChartCreation extends PureComponent<
         'database.database_name',
         'schema',
       ],
-      filters: [{ col: 'table_name', opr: 'ct', value: search }],
+      filters: [
+        { col: 'table_name', opr: exactMatch ? 'eq' : 'ct', value: search },
+      ],
       page,
       page_size: pageSize,
       order_column: 'table_name',

Reply via email to