Skip to content

bug(drag-drop): cdk-drop-list-receiving class isn't updated when using OnPush change detection strategy #26362

Closed
@JohnKis

Description

@JohnKis

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

The cdk-drop-list-receiving class isn't updated when using OnPush change detection strategy. When reverting to the default change detection strategy, the issue's no longer present.

Reproduction

https://stackblitz.com/edit/angular-kd4k7k?file=src/app/drop-list.component.css

Steps to reproduce:

  1. Start dragging an item

Expected Behavior

Receiving connected lists should change their background colour to red.

Actual Behavior

Receiving connected lists does not change their background colour to red until the item is dragged to one of them.

Also if the item is dragged to a receiving list and then back to its original list and dropped there, the class isn't cleared from the previously receiving list.

Environment

  • Angular: 15.0.4
  • CDK/Material: 15.0.3
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/drag-drop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions