Tag Archives: checkbox

ReactJS check radio/checkbox buttons and scrolling of wrapper div to top – fixed

Issue:

There is a long list of categories to select from. Since the list was long and it could not fit within the wrapper div the maximum height of the wrapper div had to be set and make the wrapper div scrollable by using css properties. Here comes the issue. Whenever a category is checked the react state is changed which caused the component to re-render the html. The re-rendering of html cause to show the upper part visible and not the area which was in the view port while checking the category. Makes sense? Read on!

Continue reading