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

direction="horizontal" not work as expected #285

Open
aminsoraya opened this issue Sep 19, 2023 · 3 comments
Open

direction="horizontal" not work as expected #285

aminsoraya opened this issue Sep 19, 2023 · 3 comments

Comments

@aminsoraya
Copy link

After I mentioned :


 <ReactSortable list={state} setList={setState} direction="horizontal">
      {state.map((item) => (
        <div key={item.id}>{item.name}</div>
      ))}
    </ReactSortable>

It doesn't aligned as expected why?

@R3D347HR4Y
Copy link

Same problem here, direction horizontal does not do anything

@ADTC
Copy link

ADTC commented Oct 10, 2024

Such a strange choice of implementation. It is a naming problem. It looks like: horizontal means vertical, and vertical means horizontal.

I literally wrote this in my code, because vertical wouldn't do it:

  direction='horizontal' // not sure why, but horizontal means drag up and down

Note that this doesn't change how your list items are visually laid out on page. It only controls the direction the sortable is expected to work in. You should still use CSS to lay out the elements in a way that matches the expectation, such as using flex-direction, flex-wrap, etc.

@kuailingmin
Copy link

May I ask when this issue can be fixed

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

4 participants