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 2021/08/05 22:36:09 UTC

[GitHub] [superset] suddjian commented on a change in pull request #16073: fix(explore): drag & drop column select component triggering onChange unnecessarily

suddjian commented on a change in pull request #16073:
URL: https://github.com/apache/superset/pull/16073#discussion_r683828993



##########
File path: superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
##########
@@ -65,8 +66,13 @@ export const DndColumnSelect = (props: LabelProps) => {
     ) {
       onChange(optionSelectorValues);
     }
-    // eslint-disable-next-line react-hooks/exhaustive-deps
-  }, [JSON.stringify(value), JSON.stringify(optionSelector.getValues())]);
+    // when options change, that means that the dataset has changed
+    // so we have to check if values are still applicable.
+  }, [options, value, optionSelector]);

Review comment:
       That's true but I felt like appeasing the linter




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