I am using ant design steps to make the video progress steps. I want to scroll to the particular video component which matches the step number. Like if I clicked to step 3 then Element with 3rd id should sroll and come at top. This is my code.
I want this to work like this How my scrolling should work
<Col xl={6} lg={6} md={4} sm={24} xs={24}>
<Card
className='fixedDivWrapper'
style={{ width: "35vh", marginLeft: "5vw", marginBottom: "20vh" }}
>
<div
style={{
overflow: "auto",
height: "80vh",
}}
id='style'
>
<Steps current={current} onChange={onChange} direction='vertical'>
<Step title='Sans Tutorials 1' />
<Step title='Sans Tutorials 2' />
<Step title='Sans Tutorials 3' />
<Step title='Sans Tutorials 4' />
<Step title='Sans Tutorials 5' />
<Step title='Sans Tutorials 6' />
<Step title='Sans Tutorials 7' />
<Step title='Sans Tutorials 8' />
<Step title='Sans Tutorials 9' />
<Step title='Sans Tutorials 10' />
<Step title='Sans Tutorials 11' />
<Step title='Sans Tutorials 12' />
<Step title='Sans Tutorials 13' />
<Step title='Sans Tutorials 14' />
</Steps>
</div>
</Card>
</Col>
<Col
style={{ textAlign: "left" }}
xl={18}
lg={18}
md={20}
sm={20}
xs={20}
>
<Element id='1'>
<HelpVideo />
</Element>
<Element>
<HelpVideo id='2' />
</Element>
<Element>
<HelpVideo id='3' />
</Element>
<Element>
<HelpVideo id='4' />
</Element>
<Element>
<HelpVideo id='5' />
</Element>
<Element>
<HelpVideo id='6' />
</Element>
<Element>
<HelpVideo id='7' />
</Element>
<Element>
<HelpVideo id='8' />
</Element>
</Col>
</Row>