How to scroll to bottom of a full list in a Modal?

Need to scroll the modal to a specific item in my list. Please see this video for reference: https://www.loom.com/share/4e58a2c3d46e4311b794e88ba3fa702d?sid=336f120b-edf3-4483-98d3-204582ff6db6

Anyone who can please help with this?

got it, I’am checking

1 Like

There are some problem with your configuration, and we’ll address them one by one. First, for the scroll_to_button action to work, you need to ensure that the length of your list is ultimately a fixed value, whether it’s using %, fr, or px, as these will ultimately calculate the length of the list. This way, scroll_to_button can determine the step to which the component should scroll. If the length of the list is set to fit, then theoretically, the length of the list component is not fixed, making it impossible to accurately scroll to the desired position. Loom Message - 29 March 2025 | Loom

Secondly, regarding your request for the list to scroll to a specific item, this is a feature we missed and are planning to schedule. However, you can achieve a similar effect by adding a reply and then directly scrolling to the bottom of the reply_list. One important thing to note is that this will only work if the length of the content within the container exceeds the container’s own length. In that case, you need to set the overflow to scroll in order to enable scrolling.

Thirdly, regarding the loading speed of the modal, I have confirmed with the engineering team that our current modal component is not fully optimized. If it carries a lot of data, it may load slowly. My suggestion is to try placing the show modal action first, so the modal is displayed before the data is loaded. However, the plan with this approach is that you will need to use an additional conditional container to wrap the content inside the modal as a loading case, and then switch back once the data is fully loaded.