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



##########
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:
       It works for the array because the roundtrip preserves the text in the 
form:
   
   ```
   a => ['a'] => a
   a, => ['a', ''] => a,
   ```
   
   But for query we need to store the intermediary value for cases like this:
   
   ```
   a=1&b => {a: 1, b: ''} => a=1&b=
   ```




-- 
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