In my app, the menu list & main content are dynamically generated. This means that scrollTargetIds will be different each time and so I'm populating that using a state variable. Due to this, the scrollspy behavior is not happening as expected. But it working when I declare scrollTargetIds as static values.
Can this be handled?