ember-table icon indicating copy to clipboard operation
ember-table copied to clipboard

Performant occlusion of columns (module not found when extending `ember-tbody`)

Open johanrd opened this issue 3 years ago • 0 comments

I have a table with a lot more columns than rows (the columns can be a long scroll of dates, easily more than hundred):

Scoreboard April 2 April 3 April 4 April 5 April 6 April 7 April 8 April 9 April 10 April 11 April 12 April 13
Person A 9 8 6 6 5 10 78 13 8 83 7 9
Person B 8 2 9 0 8 72 72 9 9 0 0 5

Ember table struggles with the performance here, and I guess that is because it is not built for horizontal occlusion.

Over at vertical-collection there is a horizontal-collection PR which I was tempted to try out by extending ember-tbody. However, when trying to extend ember-tbody, I get the following error on import:

// ember-tbody-horizontal.js
import EmberTbody from 'ember-table/components/ember-tbody/component';
export default class EmberTbodyHorizontal extends EmberTbody {}
-Cannot find module 'ember-table/components/ember-tbody/component' or its corresponding type declarations.

I was planning to extend ember-tbody in the following way:

// ember-tbody-horizontal.hbs
-{{#vertical-collection
+{{#horzontal-collection
...

As I understand from @pzuraq's comment on #612, extending a component is an anti-pattern in the first place – are there any other composable way to try out horizontal collection for performant occlusion of columns?

Thanks!

johanrd avatar Aug 26 '22 07:08 johanrd