0
点赞
收藏
分享

微信扫一扫

agGride主动操作滚动条滚动到底部

1. 业务场景:

     可编辑表格,新增编辑项后滚动条滚动到底部看到最后一项新增数据。

2. 方法

 const ht = document.getElementsByClassName("ag-body-viewport ag-layout-normal ag-row-no-animation")
      ht.forEach((item) => {
        item.scroll({
          top: item.scrollHeight,
          left: 0,
          behavior: "smooth" //滚动条平滑滚动
        });
      })
举报

相关推荐

0 条评论