Preserve scroll position on LG->Cohort Members - #9442
Conversation
✅ Deploy Preview for ilios-frontend ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Visual Diff Report — PASSED984 images compared: 984 identical Download the results. |
|
NTS: Might be able to fix with different way of tracking the |
79e5360 to
250bc52
Compare
|
I think the answer is in Somewhere in... ...there is a place we could cache this data so we didn't return the My suspicion is that it's in: ...but might be somewhere else. What should happen when a user is moved is that the array decreases by one person and, that will trigger a re-render in the shadow dom, and that one row will get removed. What is actually happening is that This is worth tracking down, the scroll position tracking feels like a bandaid to me. |
…rs change after moving one from cohort->LG
250bc52 to
5445c97
Compare
Fixes ilios/ilios#7305
Lots of time toying with complicated modifiers and scroll event listeners, but finally got a simple one to do the trick that uses the
scrollendevent so that it only triggers when scrolling stops, not on everyscrollevent. It only works with modern (Dec 2025 or newer) versions of browsers, but will just be ignored otherwise.Note: there already exists a
PreserveScrollservice, but that works when transitioning between routes, and this PR adds an element modifier that can remember scroll position within a route.