Hi @bharathm
The reason for this behavior is a fact that you are attaching the footer class to the last row which is calculated. It works correctly if the data set isn’t increased vertically, but in case it is the custom class is added to the every row that is created below the initial one set as the last.
In order to change that you would need to create a logic that will check if the previous rows has this class, and if they do, remove it and keep it only in the last current row. The other solution would be to block the ability to paste the data beyond the last row. For this we have a solution and I added it to your example: https://stackblitz.com/edit/tghj6bj3-v5gzsjkp?file=index.js,styles.css,index.html