You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2021/08/10 05:01:25 UTC

[superset] 15/25: fix(explore): revert dnd column dependency array change to fix infinite rerenders (#16115)

This is an automated email from the ASF dual-hosted git repository.

villebro pushed a commit to branch 1.3
in repository https://gitbox.apache.org/repos/asf/superset.git

commit d5602a6017cbc5532ebe59d2cfcec50cc42e9c03
Author: Kamil Gabryjelski <ka...@gmail.com>
AuthorDate: Fri Aug 6 17:59:22 2021 +0200

    fix(explore): revert dnd column dependency array change to fix infinite rerenders (#16115)
    
    * fix(explore): revert dnd column dependency array change to fix infinite rerenders
    
    * Remove console.log
    
    * Remove comment
    
    (cherry picked from commit 772da8de6353f01ea1c64037af9695d5f10b71e4)
---
 .../components/controls/DndColumnSelectControl/DndColumnSelect.tsx    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
index 32097b2..e8f64db 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
@@ -66,9 +66,7 @@ export const DndColumnSelect = (props: LabelProps) => {
     ) {
       onChange(optionSelectorValues);
     }
-    // when options change, that means that the dataset has changed
-    // so we have to check if values are still applicable.
-  }, [options, value, optionSelector]);
+  }, [JSON.stringify(value), JSON.stringify(optionSelector.getValues())]);
 
   // useComponentDidUpdate to avoid running this for the first render, to avoid
   // calling onChange when the initial value is not valid for the dataset