Not Scrolling to Dynamically Created Elements
See original GitHub issueI’m trying to use scroller.scrollTo to target elements created in a .map function. Here’s my code
{questions.map((ele,i)=>
<Element name={"question-" + i}>
<Question key = { "question-"+i }
question = { ele }
qInd = { i }
backgroundColor = { ele.backgroundColor }
color = { ele.color }
type = { ele.type }
results = { this.state.quiz.results }
score = { this.score }
id = { "question-"+i }/>
</Element>
)}
Any ideas how to fix this?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
why scrolling is disabled when i add new element in ...
1 Answer 1 · The element you're adding is position: absolute so it's not part of the element layout, so the element doesn't...
Read more >Scroll Trigger and Timeline not working with dynamically ...
Can someone help me with getting the dynamic elements to load before the timeline? I don't want to move my gsap to the...
Read more >Perfect scrollbar not visible when elements are dynamically ...
Hello I am trying to dynamically load some links from an array(JSON encoded values) as a list inside a div using Javascript.
Read more >Programmatically scroll to a dynamically created div
Insecure Resource. The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https....
Read more >Element size and scrolling
Setting scrollTop to 0 or a big value, such as 1e9 will make the element scroll to the very top/bottom respectively. Don't take...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, you can.
@jhlabs Too bad we can’t scroll to element by ID already