Skip to content

Commit

Permalink
Merge branch 'mtsvyatkova/feat-1379-tile-manager' of https://github.c…
Browse files Browse the repository at this point in the history
…om/IgniteUI/igniteui-webcomponents into mtsvyatkova/feat-1379-tile-manager
  • Loading branch information
onlyexeption committed Jan 15, 2025
2 parents 043c97d + ab40a9a commit f36ab80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/tile-manager/controllers/tile-dnd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ export class TileDragAndDropController implements ReactiveController {
}
}

public hostConnected(): void {
public hostUpdate(): void {
this._host.draggable = this.enabled;
}

public hostConnected(): void {
for (const type of DragEvents) {
this._host.addEventListener(type, this);
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/tile-manager/tile-dnd.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,13 @@ describe('Tile drag and drop', () => {
const eventSpy = spy(tileManager, 'emitEvent');
const tileWrapper = getTileBaseWrapper(draggedTile);

expect(draggedTile.draggable).to.be.true;
expect(tileWrapper.getAttribute('part')).to.include('draggable');

draggedTile.disableDrag = true;
await elementUpdated(tileManager);

expect(draggedTile.draggable).to.be.false;
expect(tileWrapper.getAttribute('part')).to.not.include('draggable');

await dragAndDrop(draggedTile, dropTarget);
Expand Down

0 comments on commit f36ab80

Please sign in to comment.