ticlo / rc-dock

Dock Layout for React Component

Home Page:https://ticlo.github.io/rc-dock/examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistent arguments of `panel-extra` in `panelLock`

Max-ChenFei opened this issue · comments

Hi, in the example there are two parameters (panelData, context) at line 77

panelLock: {
minWidth: 200,
panelExtra: (panelData, context) => (
<button className='btn'
onClick={() => context.dockMove(newTab(), panelData, 'middle')}>
add
</button>

but in the type definition, there is only one parameter (panelData)
panelExtra?: (panel: PanelData) => React.ReactElement;

I am confused about this example when using rc-dock in tsx.
Could you please tell me more?

Thanks.