Norserium / react-indiana-drag-scroll

React component which implements scrolling via holding the mouse button or touch

Home Page:https://norserium.github.io/react-indiana-drag-scroll/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vertical scroll not working ?

donpernino opened this issue · comments

Hello,

I tried to use the plugin like so :

<ScrollContainer className="scroll-container" vertical={true} horizontal={true}> <MyImage /> </ScrollContainer>

I am able to scroll horizontally by dragging but I can't move vertically at all. I don't know what I should do.

Thanks

Hello!

Could you upload the example, that illustrates your problem?

I can't reproduce this bug here.

Here you go :)

There is no problem. Your image resizes container vertically, so it fits completely in the container.

Just set the max height of your container and vertical dragging will be appear
https://codesandbox.io/s/test-indiana-drag-scroll-e1xgm

Okay my bad indeed, I did not think of the max-height. Sorry and thanks for the reactivity

@donpernino, you are welcome!

Hi there,

I am also having the same issue. my vertical scroll is not working and in my example height is more than the screen height I can see the scroll bar on the right side.
` <ScrollContainer
vertical={true}
horizontal={true}
hideScrollbars={true}
Screen Shot 2022-12-08 at 10 34 43 AM

    >`

is code.

@Kamlesh-62, what's version do you use?

I guess the latest one @2.2.0

@Kamlesh-62, try to use @next version for test.

I am sorry I did not understand correctly, what's the @next version? if you can provide me a link that would be really appreciated.

You means this version @3.0.3-alpha

Nope, I tried with this @3.0.3-alpha, it is not scrolling, even the whole right part gets hidden. I you have any solution for the current version?

Thanks find a solution. On the scroll-container "Div", I gave 100vh height it worked. I don't know why it did not work on the default height from the browser. Thanks, BTW.

@Kamlesh-62, all's well that ends well.