Skip to content

Commit 0b9658d

Browse files
Fix React 18 type incompatibility with react-split-pane using type cast
Co-authored-by: thomasnordquist <7721625+thomasnordquist@users.noreply.github.com>
1 parent f18336b commit 0b9658d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/src/components/Layout/ContentView.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react'
22
import ChartPanel from '../ChartPanel'
3-
import ReactSplitPane from 'react-split-pane'
3+
import ReactSplitPaneImport from 'react-split-pane'
44
import Tree from '../Tree'
55
import { AppState } from '../../reducers'
66
import { ChartParameters } from '../../reducers/Charts'
@@ -9,6 +9,9 @@ import { List } from 'immutable'
99
import { Sidebar } from '../Sidebar'
1010
import { useResizeDetector } from 'react-resize-detector'
1111

12+
// Type cast to any to work around React 18 compatibility issues with react-split-pane 0.1.x
13+
const ReactSplitPane = ReactSplitPaneImport as any
14+
1215
interface Props {
1316
heightProperty: any
1417
paneDefaults: any

0 commit comments

Comments
 (0)