silverstripe / silverstripe-linkfield

Silverstripe module for managing links
BSD 3-Clause "New" or "Revised" License
4 stars 14 forks source link

Screen jumps up on rerender of MultiLinkField #169

Closed emteknetnz closed 8 months ago

emteknetnz commented 8 months ago

When you have a number of Links in a MultiLinkField and the LinkField react component rerenders creating an AJAX request to refetch Links, and for a short time the amount of vertical space taken up by the component reduces and it causes the browser screen to abruptly move up, loosing the users place on the screen

https://www.youtube.com/watch?v=HPimduM7bRU

This is because we render the loading component instead of the list of links. We should instead wash out the link list and display the loading component on top of it. This will retain all of the rendered content while we're loading (preventing this scroll jump), and makes it a lot clearer what specifically is loading.

PRs