3

I use Element UI Table in a project and wondering how I can use vue-virtual-scroller with it.

I couldn't figure out a way because in all virtual-scroller examples I saw, it was expected(as expected) that the loop is run on the list item or a table row element / component.

With Element UI though, the rows are rendered implicitly based on the columns components passed to default slot of el-table.

Example

<el-table
  :data="tableData"
  style="width: 100%">
  <el-table-column
    prop="date"
    label="Date"
    width="180">
  </el-table-column>
  <el-table-column
    prop="name"
    label="Name"
    width="180">
  </el-table-column>
<el-table>

So, I have no idea how to control the row rendering or wrap a row inside my virtual scroller.

Is there anything I can do or do I have to resort to other table library that does allow row based rendering?

Community
  • 1
  • 1
Praveen Puglia
  • 5,279
  • 4
  • 29
  • 59
  • Virtualization is one of the things that I really wish Element had, but I think you are correct in that it’s be best to use something else. Paging seems to be the defacto for them. – Neil.Work Jul 17 '19 at 03:58

0 Answers0