betodealmeida commented on a change in pull request #16241:
URL: https://github.com/apache/superset/pull/16241#discussion_r688127582



##########
File path: 
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
##########
@@ -339,16 +352,17 @@ function dbReducer(
         };
       }
 
+      // convert query to a string and store in query_input
+      query = action.payload?.parameters?.query || {};
+      query_input = Object.entries(query)
+        .map(([key, value]) => `${key}=${value}`)
+        .join('&');

Review comment:
       I don't think we're doing this anywhere else.
   
   With this PR we convert query to a string and store it in `query_input` when 
we fetch the database. Changes to `query_input` are passed to `query`, but this 
is might not survive a roundtrip (`a=b&` => `{a: 'b'}` => `a=b`), so we keep 
`query_input` always up to date and use it to populate the form input.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to