ShivamJoker / React-Fast-Accordion

Simple, fast, accessible accordion library with no dependency
https://www.npmjs.com/package/react-fast-accordion
GNU General Public License v3.0
58 stars 4 forks source link

Feature: Automatically scroll element into view if needed #5

Open ShivamJoker opened 2 years ago

ShivamJoker commented 2 years ago

We need something like scrollIntoViewIfNeeded but it's not majorly supported and doesn't have smooth behaviour

https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoViewIfNeeded

Content scroll height needs to be added as well while scrolling the element

ashutosh887 commented 2 years ago

I would like to give this issue a try.

ShivamJoker commented 2 years ago

Awesome. Just send a PR when you are done, use the existing example code to check if it scrolls automatically in the bottom.