From 41f0168011bfeb74e3d711afe7f1dff167ab905c Mon Sep 17 00:00:00 2001 From: joelamb <42837452+joelamb@users.noreply.github.com> Date: Thu, 28 Sep 2023 12:17:19 +0100 Subject: [PATCH] fix: revert sizing plugin forColumns None of this logic was previously working, because the feature 'columnResizing' that was added in commit: 7a098784914b087e423f052ec6b15f16345a56ca and being used to lookup the plugin was incorrect. Since we were always getting back the table.columns.values, we can revert this unused logic. --- .../src/plugins/-private/base.ts | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/ember-headless-table/src/plugins/-private/base.ts b/ember-headless-table/src/plugins/-private/base.ts index 84dcdbfe..cf188292 100644 --- a/ember-headless-table/src/plugins/-private/base.ts +++ b/ember-headless-table/src/plugins/-private/base.ts @@ -289,7 +289,6 @@ function columnsFor( let visibility = findPlugin(table.plugins, 'columnVisibility'); let reordering = findPlugin(table.plugins, 'columnOrder'); - let sizing = findPlugin(table.plugins, 'columnResizing'); // TODO: actually resolve the graph, rather than use the hardcoded feature names // atm, this only "happens" to work based on expectations of @@ -302,10 +301,6 @@ function columnsFor( table.plugins.some((plugin) => plugin instanceof (requester as Class)) ); - if (sizing && sizing.constructor === requester) { - return table.columns.values(); - } - if (visibility && visibility.constructor === requester) { return table.columns.values(); } @@ -341,15 +336,6 @@ function columnsFor( return visibility.columns; } - if (sizing) { - assert( - `<#${sizing.name}> defined a 'columns' property, but did not return valid data.`, - sizing.columns && Array.isArray(sizing.columns) - ); - - return sizing.columns; - } - return table.columns.values(); } @@ -375,15 +361,6 @@ function columnsFor( return visibility.columns; } - if (sizing) { - assert( - `<#${sizing.name}> defined a 'columns' property, but did not return valid data.`, - sizing.columns && Array.isArray(sizing.columns) - ); - - return sizing.columns; - } - return table.columns.values(); }