diff --git a/superset-frontend/src/explore/components/ExploreChartPanel/index.jsx b/superset-frontend/src/explore/components/ExploreChartPanel/index.jsx index bea6f8653c2a8..893a10275a25d 100644 --- a/superset-frontend/src/explore/components/ExploreChartPanel/index.jsx +++ b/superset-frontend/src/explore/components/ExploreChartPanel/index.jsx @@ -46,7 +46,7 @@ import { getChartRequiredFieldsMissingMessage } from 'src/utils/getChartRequired import { DataTablesPane } from '../DataTablesPane'; import { ChartPills } from '../ChartPills'; import { ExploreAlert } from '../ExploreAlert'; -import useChartPanelResize from './useResizeDectorByObserver'; +import useResizeDetectorByObserver from './useResizeDetectorByObserver'; const propTypes = { actions: PropTypes.object.isRequired, @@ -146,7 +146,7 @@ const ExploreChartPanel = ({ observerRef: resizeObserverRef, width: chartPanelWidth, height: chartPanelHeight, - } = useChartPanelResize(); + } = useResizeDetectorByObserver(); const [splitSizes, setSplitSizes] = useState( isFeatureEnabled(FeatureFlag.DATAPANEL_CLOSED_BY_DEFAULT) ? INITIAL_SIZES diff --git a/superset-frontend/src/explore/components/ExploreChartPanel/useResizeDectorByObserver.ts b/superset-frontend/src/explore/components/ExploreChartPanel/useResizeDetectorByObserver.ts similarity index 96% rename from superset-frontend/src/explore/components/ExploreChartPanel/useResizeDectorByObserver.ts rename to superset-frontend/src/explore/components/ExploreChartPanel/useResizeDetectorByObserver.ts index 112823ecddb9c..afbeeeb1e0354 100644 --- a/superset-frontend/src/explore/components/ExploreChartPanel/useResizeDectorByObserver.ts +++ b/superset-frontend/src/explore/components/ExploreChartPanel/useResizeDetectorByObserver.ts @@ -19,7 +19,7 @@ import { useState, useCallback, useRef } from 'react'; import { useResizeDetector } from 'react-resize-detector'; -export default function useResizeDetectorByTarget() { +export default function useResizeDetectorByObserver() { const ref = useRef(); const [{ width, height }, setChartPanelSize] = useState<{ width?: number;