Skip to content

Commit

Permalink
fix(addon/components/paper-grid-list): adds mutation-observer to de…
Browse files Browse the repository at this point in the history
…tect DOM elements being reordered.
  • Loading branch information
matthewhartstonge committed Nov 14, 2024
1 parent ef17137 commit 1207399
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions addon/components/paper-grid-list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
class={{@class}}
{{did-insert this.didInsertNode}}
{{did-update this.didUpdateNode @cols @gutter @rowHeight}}
{{mutation-observer this.didUpdateNode}}
...attributes
>
{{yield (hash tile=(component 'paper-grid-tile' parent=this))}}
Expand Down
4 changes: 1 addition & 3 deletions tests/integration/components/paper-grid-list-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable prettier/prettier */
import { module, test, skip } from 'qunit';
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, find, waitUntil } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
Expand Down Expand Up @@ -335,7 +334,6 @@ module('Integration | Component | paper-grid-list', function (hooks) {

this.tiles.reverseObjects();
await waitUntil(browserFramesRendered);
await waitUntil(() => find('.TWO'));

assert.equal(tilePosition('.ONE'), 3);
assert.equal(tilePosition('.TWO'), 2);
Expand Down

0 comments on commit 1207399

Please sign in to comment.