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/04/28 17:44:24 UTC

[GitHub] [superset] codemaster08240328 commented on a diff in pull request #19841: fix: Table chart column config issue

codemaster08240328 commented on code in PR #19841:
URL: https://github.com/apache/superset/pull/19841#discussion_r861164650


##########
superset-frontend/src/explore/reducers/exploreReducer.js:
##########
@@ -131,11 +131,30 @@ export default function exploreReducer(state = {}, action) {
     },
     [actions.SET_FIELD_VALUE]() {
       const new_form_data = state.form_data;
+      const old_metrics_data = state.form_data.metrics;
+      const new_column_config = state.form_data.column_config;

Review Comment:
   @diegomedina248 , no need, because this is reducer section, and in reducer we return the state. So mutating old data has no effect to setting state again. There is no need to do shallow copy in reducer.



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