Results 1 to 2 of 2

Thread: Get dataview element based on scroll position

  1. #1

    Default Get dataview element based on scroll position

    So, I'm developing a chat app and I'm showing the messages using a dataview using CSS flex-direction:column, so far so good, the problem is that I want to use an Ext.Toast to show the user the day that the messages were sent, as he is scrolling the dataview, something like WhatsApp does, it is possible to get x element of dataview based on dataview scroll position?

  2. #2
    Sencha User
    Join Date
    Oct 2018
    Location
    Noida
    Posts
    51
    Answers
    9

    Default

    As the height of the dataview items can be different to each other based on content, so it might not be a good idea to get the element by scroll position.
    However if dataview items has same equal heights, then you can get scrollable element in dataview and get its scroll top, then you can divide scrollTop from one item height to find the items at the top right now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •