diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx index 21e2261da060..46b3889fdd68 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