Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions addon/templates/components/ember-table.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,21 @@
</thead>

<div class="et-tbody-container" data-test-body-container>
{{#vertical-collection rows
estimateHeight=estimateRowHeight
tagName="tbody"
class="et-tbody"
<tbody class="et-tbody">
{{#vertical-collection rows
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vertical-collection is now tagless, so we need to create an external tbody element and add a containerSelector

estimateHeight=estimateRowHeight
containerSelector=".et-tbody-container"

as |rowValue rowIndex|
}}

{{yield (hash
value=rowValue
index=rowIndex
api=api)
as |rowValue rowIndex|
}}
{{/vertical-collection}}

{{yield (hash
value=rowValue
index=rowIndex
api=api)
}}
{{/vertical-collection}}
</tbody>
</div>

{{#if hasFooter}}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"@addepar/ice-box": "^0.1.3",
"@html-next/vertical-collection": "https://github.com/html-next/vertical-collection.git#27bd1d2f5708a985a082a6faca973b0d88c4e525",
"@html-next/vertical-collection": "1.0.0-beta.9",
"css-element-queries": "^0.4.0",
"ember": "^1.0.3",
"ember-cli-babel": "^6.7.1",
Expand Down
4 changes: 2 additions & 2 deletions tests/helpers/test-scenarios.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import hbs from 'htmlbars-inline-precompile';
import { A as emberA } from '@ember/array';
import waitForRender from 'dummy/tests/helpers/wait-for-render';
import ColumnDefinition from 'ember-table/models/column-definition';
import wait from 'ember-test-helpers/wait';

export const DEFAULT_TABLE_OPTIONS = {
numFixedColumns: 1,
Expand Down Expand Up @@ -137,5 +137,5 @@ export function setupFullTable(
testContext.set('tableRows', generateRows(rowCount, columnCount));
testContext.set('rowComponent', rowComponent);
testContext.render(fullTable);
return waitForRender();
return wait();
}
11 changes: 0 additions & 11 deletions tests/helpers/wait-for-render.js

This file was deleted.

7 changes: 5 additions & 2 deletions tests/integration/components/ember-table-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { moduleForComponent, test } from 'ember-qunit';
import wait from 'ember-test-helpers/wait';

import {
simpleTable,
generateColumns,
Expand All @@ -7,12 +9,13 @@ import {
DEFAULT_ROW_COLUMN_COUNT,
DEFAULT_COLUMN_WIDTH
} from '../../helpers/test-scenarios';
import waitForRender from 'dummy/tests/helpers/wait-for-render';

import {
find,
findAll,
scrollTo
} from 'ember-native-dom-helpers';

import tableHelpers from '../../helpers/table-helper';

moduleForComponent('ember-table', 'Integration | Component | ember table', {
Expand All @@ -27,7 +30,7 @@ test('Ember table renders', async function(assert) {

this.render(simpleTable);

await waitForRender();
await wait();
await scrollTo(find('[data-test-body-container]'), 0, 600);

// Check column header count
Expand Down
2 changes: 2 additions & 0 deletions tests/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import {
} from 'ember-qunit';
import { start } from 'ember-cli-qunit';
import 'dummy/app';
import registerRAFWaiter from 'ember-raf-scheduler/test-support/register-waiter';

registerRAFWaiter();
setResolver(resolver);
start();
15 changes: 6 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,19 @@
dependencies:
"@glimmer/di" "^0.2.0"

"@html-next/vertical-collection@https://github.com/html-next/vertical-collection.git#27bd1d2f5708a985a082a6faca973b0d88c4e525":
version "1.0.0-beta.7"
resolved "https://github.com/html-next/vertical-collection.git#27bd1d2f5708a985a082a6faca973b0d88c4e525"
"@html-next/vertical-collection@1.0.0-beta.9":
version "1.0.0-beta.9"
resolved "https://registry.yarnpkg.com/@html-next/vertical-collection/-/vertical-collection-1.0.0-beta.9.tgz#a23fe4d82e4ef059e955abe276f57f27269b37a5"
dependencies:
babel-plugin-filter-imports "^0.3.1"
babel-plugin-transform-es2015-block-scoping "^6.24.1"
babel6-plugin-strip-class-callcheck "^6.0.0"
broccoli-funnel "^1.2.0"
broccoli-merge-trees "^2.0.0"
broccoli-rollup "^1.2.0"
ember-cli-babel "^6.0.0-beta.10"
ember-cli-htmlbars "^1.1.1"
ember-compatibility-helpers "^0.1.2"
ember-raf-scheduler "0.1.0"

abbrev@1:
version "1.1.0"
Expand Down Expand Up @@ -586,10 +587,6 @@ babel-plugin-eval@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/babel-plugin-eval/-/babel-plugin-eval-1.0.1.tgz#a2faed25ce6be69ade4bfec263f70169195950da"

babel-plugin-filter-imports@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/babel-plugin-filter-imports/-/babel-plugin-filter-imports-0.3.1.tgz#e7859b56886b175dd2616425d277b219e209ea8b"

babel-plugin-htmlbars-inline-precompile@^0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/babel-plugin-htmlbars-inline-precompile/-/babel-plugin-htmlbars-inline-precompile-0.2.3.tgz#cd365e278af409bfa6be7704c4354beee742446b"
Expand Down Expand Up @@ -2577,7 +2574,7 @@ ember-qunit@^2.1.3:
dependencies:
ember-test-helpers "^0.6.3"

ember-raf-scheduler@^0.1.0:
ember-raf-scheduler@0.1.0, ember-raf-scheduler@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/ember-raf-scheduler/-/ember-raf-scheduler-0.1.0.tgz#a22a02d238c374499231c03ab9c5b9887c72a853"
dependencies:
Expand Down