WICG / virtual-scroller

Other
2k stars 83 forks source link

Can this be used for virtualized table rows? #105

Open domenic opened 6 years ago

domenic commented 6 years ago

A common use case on the web is data tables, using the <table> element... but virtualized.

Can this be done using our implementation?

(Note: column auto-sizing seems basically impossible. All columns would have to be fixed width.)

I can see a few paths here:

This seems like an area ripe for exploration and hacking around.

valdrinkoshi commented 6 years ago

Even if controversial, using is="" would really help here, as we could do something like this

class VirtualTableElement extends VirtualScrollerMixin(HTMLTableElement) {
  // ...
}
customElements.define('virtual-table', VirtualTableElement, { extends: 'table' });

and use it like this

<table is="virtual-table">
 <template> <tr><td>cell!</td></tr> </template>
</table>

(note: VirtualScrollerMixin would be where most of the current implementation relies)

oswee commented 5 years ago

Virtual tables are really important in enterprise grade SaaS (which are important for GCP :) ). All CRMs, ERPs, "you-name-it" use a huge amount of tables/data grids and virtual scrolling is critical there, because old school pagination is no more suitable and pretty impossible to work with. Long time ago in some demo project we was testing ExtJS buffered grid. Was working pretty fine. Probably worth to look into because it is one of most "enterprise'e" framework and probably are accumulating huge amount of expertise. I am not an expert in programming. More like a PO. But yesterday had an idea to try this together with websockets or grpc-web kinda thing. I mean some kind of data streaming.