split-pane-react
split-pane-react copied to clipboard
TS2322: Type 'Element | undefined' is not assignable to type 'Element'. Type 'undefined' is not assignable to type 'ReactElement<any, any>'
thanks very much for your project
i hope if the currentSelectedTask === undefine , do not render the second <Pane>
but i got a ts error:
TS2322: Type 'Element | undefined' is not assignable to type 'Element'. Type 'undefined' is not assignable to type 'ReactElement<any, any>

if i change my code to this:
{currentSelectedTask !== undefined ? (
<Pane className={"pane"}> pane 222</Pane>
) : (
<></>
)}
its work, but , it has two pane in the dom:

maybe we need to let the SplitPane children support null
maybe we need to let the
SplitPanechildren supportnull
最近有点忙,你有时间可以修复一下,然后提一个merge request。我得忙完了这阵才有精力看这个问题。