diff --git a/superset-frontend/src/explore/components/DatasourcePanel.tsx b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanel.tsx
similarity index 86%
rename from superset-frontend/src/explore/components/DatasourcePanel.tsx
rename to superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanel.tsx
index e89e41f0f7c..bd76a4d6732 100644
--- a/superset-frontend/src/explore/components/DatasourcePanel.tsx
+++ b/superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanel.tsx
@@ -28,10 +28,11 @@ import {
import { debounce } from 'lodash';
import { matchSorter, rankings } from 'match-sorter';
import { FAST_DEBOUNCE } from 'src/constants';
+import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
import { ExploreActions } from 'src/explore/actions/exploreActions';
-import Control from './Control';
-import DatasourcePanelDragWrapper from './DatasourcePanel/DatasourcePanelDragWrapper';
-import { DatasourcePanelDndType } from './DatasourcePanel/types';
+import Control from 'src/explore/components/Control';
+import DatasourcePanelDragWrapper from './DatasourcePanelDragWrapper';
+import { DatasourcePanelDndType } from './types';
interface DatasourceControl extends ControlConfig {
datasource?: DatasourceMeta;
@@ -101,6 +102,10 @@ const LabelContainer = styled.div`
}
`;
+const enableExploreDnd = isFeatureEnabled(
+ FeatureFlag.ENABLE_EXPLORE_DRAG_AND_DROP,
+);
+
export default function DataSourcePanel({
datasource,
controls: { datasource: datasourceControl },
@@ -206,12 +211,16 @@ export default function DataSourcePanel({
{metricSlice.map(m => (
-
+ {enableExploreDnd ? (
+
+
+
+ ) : (
-
+ )}
))}
@@ -224,12 +233,16 @@ export default function DataSourcePanel({
{columnSlice.map(col => (
-
+ {enableExploreDnd ? (
+
+
+
+ ) : (
-
+ )}
))}
diff --git a/superset-frontend/src/explore/components/DatasourcePanel/index.ts b/superset-frontend/src/explore/components/DatasourcePanel/index.ts
new file mode 100644
index 00000000000..82a25731596
--- /dev/null
+++ b/superset-frontend/src/explore/components/DatasourcePanel/index.ts
@@ -0,0 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+export { default } from './DatasourcePanel';