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

row instead of column? #111

Open
consciousweb opened this issue Sep 10, 2021 · 7 comments
Open

row instead of column? #111

consciousweb opened this issue Sep 10, 2021 · 7 comments
Labels
DraxList Specific to DraxList component functionality question Question about the library and/or its usage styling Related to styling the components

Comments

@consciousweb
Copy link

Is it possible to set drax for a sortable list with a wrapped flex row of items instead of a column?

@lafiosca
Copy link
Contributor

Do you mean the horizontal prop to DraxList or something more complex?

@lafiosca lafiosca added DraxList Specific to DraxList component functionality question Question about the library and/or its usage labels Sep 11, 2021
@consciousweb
Copy link
Author

@lafiosca i want it to flex wrap, so after a certain number of columns, it creates a new row

@lafiosca
Copy link
Contributor

Hmm is it possible #99 could support this, if we manage to get it merged?

@consciousweb
Copy link
Author

consciousweb commented Sep 12, 2021 via email

@lafiosca
Copy link
Contributor

Any props you pass to DraxList that it does not consume are passed to the underlying Flatlist. I’m not sure if that helps.

@consciousweb
Copy link
Author

nothing i pass to the style prop of draxlist is reflected at render.

@lafiosca
Copy link
Contributor

Yes I suppose that makes sense if the DraxList is building its own style. (I apologize, but I’ve been making these short replies from away from the computer without an opportunity to dig into the code.)

I’ve never seen a wrapped flex row list before and didn’t realize FlatList supports it. But thinking about it some more, it would definitely require DraxList to support x/y shift offsets rather than just a single dimension like it does now. So I think a PR like the one I linked above would be a prerequisite before we could make this work, and then an additional enhancement would be required to allow you to pass the proper style parameters. It seems to me it should be possible to pass your own styles and have them merge with and/or override whatever DraxList is using, at the user’s own risk. For now I will leave this issue open as an enhancement request.

I have recently started a new job and am unsure how soon I will be putting any significant dev sessions into Drax, but other contributors are also welcome.

@lafiosca lafiosca added the styling Related to styling the components label Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DraxList Specific to DraxList component functionality question Question about the library and/or its usage styling Related to styling the components
Projects
None yet
Development

No branches or pull requests

2 participants