how to keep scroll position when append new item in chatting list after searching?

Yorumlar

1 yorum

  • Kathy Oliver

    There are a few ways to do this:

    1. Use a variable to track the scroll position. When new items are added to the list, add them at the correct position in the list based on the scroll position.

    2. Use a container element with a fixed height. When new items are added to the list, they will be added to the bottom of the container and the scroll position will not change.

    3. Use a scrollable container element with a overflow:auto style. When new items are added to the list, they will be added to the bottom of the container and the scroll position will automatically adjust.

    0

Yorum yazmak için lütfen oturum açın.