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

hugh pushed a commit to branch pexdax/db-connection-ui-show-available
in repository https://gitbox.apache.org/repos/asf/superset.git

commit ff8072db105151f2a09106fa67f35c796c701dfc
Author: hughhhh <[email protected]>
AuthorDate: Thu May 27 16:55:14 2021 -0400

    working select
---
 .../views/CRUD/data/database/DatabaseModal/index.tsx    | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git 
a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx 
b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
index 82e3754..4cf329c 100644
--- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
+++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
@@ -538,10 +538,21 @@ const DatabaseModal: 
FunctionComponent<DatabaseModalProps> = ({
               <Select
                 defaultValue={'bigquery'}
                 style={{ width: '100%' }}
-                onChange={option => console.log('hi')}
+                onChange={option => {
+                  console.log(option);
+                  setDB({
+                    type: ActionType.dbSelected,
+                    payload: {
+                      configuration_method: CONFIGURATION_METHOD.DYNAMIC_FORM,
+                      engine: option,
+                    },
+                  });
+                }}
               >
-                {availableDbs?.databases?.map((engine) => (
-                  <Select.Option key={engine.engine} 
>{engine.name}</Select.Option>
+                {availableDbs?.databases?.map(database => (
+                  <Select.Option value={database.engine} key={database.engine}>
+                    {database.name}
+                  </Select.Option>
                 ))}
               </Select>
             </>

Reply via email to