You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/02/19 23:42:26 UTC

[GitHub] xtinec commented on a change in pull request #6917: Fix database typeahead in SQL Lab

xtinec commented on a change in pull request #6917: Fix database typeahead in SQL Lab
URL: https://github.com/apache/incubator-superset/pull/6917#discussion_r258278709
 
 

 ##########
 File path: superset/assets/src/components/TableSelector.jsx
 ##########
 @@ -111,7 +111,11 @@ export default class TableSelector extends React.PureComponent {
     if (data.result.length === 0) {
       this.props.handleError(t("It seems you don't have access to any database"));
     }
-    return data.result;
+    return data.result.map(row => ({
+      ...row,
+      // label is used for the typeahead
+      label: row.backend + ' ' + row.database_name,
 
 Review comment:
   [nit] would suggest doing this via string interpolation with `${row.backend} ${row.database_name}`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org