Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

probleme with direction='vertical' #86

Open
omar-bz opened this issue Aug 18, 2017 · 1 comment
Open

probleme with direction='vertical' #86

omar-bz opened this issue Aug 18, 2017 · 1 comment

Comments

@omar-bz
Copy link

omar-bz commented Aug 18, 2017

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>
@mergebandit
Copy link
Contributor

mergebandit commented Dec 3, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants