Skip to Content
Author's profile photo Sanjoy Saha

Animate scroll to last added item in sap.m.Table

I faced an issue that after I add an item in sap.m.Table, it is going top and user has to scroll down to see last added item. Though we may have way to scroll or focus to lastly added item, but I found one line which solved the problem and thought to share. Write this one line in last line of Add button press event’s function.

jQuery('html, body').animate({scrollTop:jQuery(document).height()}, 1000);

We can add delay before animate as well.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.