Autoscroll feature to the changes
Closed this issue · 2 comments
saikiranpb commented
Is there any way to integrate a up/down button in such a way that it will autoscroll through each changes one by one?
It is very difficult to scroll through to check each changes when the file is of more than 1000 lines
otakustay commented
I wrote a demo for this: https://codesandbox.io/s/react-diff-view-change-scroll-21hx7k?file=/src/DiffView.tsx
We can find out all changes from parsed diff, by using gutterType="anchor"
and generateAnchorID={getChangeKey}
we add a id
attribute to each change cell, then we are able to track and scroll to any element we want
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.