react-use-draggable-scroll
react-use-draggable-scroll copied to clipboard
Question: How to scrollIntoView?
Hi,
This is a question, not really an issue.
I have a div with a fixed size that allows the user to scroll / drag like a map. The map contains a floor plan with different rooms / elements. There are some rooms that will not be on-screen as they are scrolled / dragged out of view.
How can I have those elements be scrolled into view automatically when selected for say a dropdown list?
I have tried selectedElement.scrollIntoView(true), this works when view on a computer, but does not work on a mobile device.
I have also tried this method: http://jsfiddle.net/p3kar5bb/322/
Thanks in advance.
Br, Alex