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 2022/02/22 12:19:06 UTC

[GitHub] [superset] zhaoyongjie commented on a change in pull request #18846: fix(key-value): lost url_params after long-url feature

zhaoyongjie commented on a change in pull request #18846:
URL: https://github.com/apache/superset/pull/18846#discussion_r811885427



##########
File path: superset-frontend/src/explore/components/ExploreViewContainer/index.jsx
##########
@@ -175,6 +175,19 @@ const updateHistory = debounce(
       additionalParam[URL_PARAMS.datasetId.name] = datasetId;
     }
 
+    const urlParams = payload?.url_params || {};

Review comment:
       > Wouldn't be cleaner to just initialize additionalParam with payload?.url_params?
   
   1. `formDataKey` in urlParams
   2.  it isn't known which url_params don't need to be put into `additionalParams`
   
   
   > If some of the parameters are already in the URL they will be overridden anyway. This way you don't need the forEach and the if check.
   
   There needs to be a pattern that controls which params can be put in, and which do not. 
   
   
   




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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