react-sortable-pane
react-sortable-pane copied to clipboard
probleme with direction='vertical'
Hi I'm using "react": "^15.6.1". when setting direction to 'horizontal' the list are normal but when set it to vertical all panes come stacked on top of each other i'm wondring if it is a bug or the code need to be fixed, the code i used is the one provided in the example of the repostrie, code:
<SortablePane direction="vertical" margin={20}>
<Pane id={0} key={0} width={120} height="100%">
<p>0</p>
</Pane>
<Pane id={1} key={1} width={120} height="100%">
<p>1</p>
</Pane>
</SortablePane>
I ran into the same issue. It only worked for me if I set a manual height on the panes. In my case, I also used react-height to determine the height of my children. Which also required me to set an id based on a combination of component ID and height...
<Pane
id={`${child.props.id}${this.state.childHeight[child.props.id]}`}
height={this.state.childHeight[child.props.id]}
if I didn't set the id this way, height
was always undefined for me, even after rerendering