feat(drag-drop): cdkConnectedTo finds all drop lists with the same ID, instead of only one
See original GitHub issueFeature Description
CdkDropList has id and cdkConnectedTo input properties to allow specifying an id or array of ids for which the drop lists should be connected.
The id input property “needs” to be unique, or better put is “assumed” to be unique - meaning when searching through drop lists to connect to by id, only the first match is returned.
Can the “need” for unique ids be removed and change the connected drop list logic to return all drop lists with a matching id?
From the user’s perspective:
- If I want a drop list to inherently be standalone, provide a unique id.
- If I want a drop list to inherently be connected to others, provide a shared id.
Use Case
Connecting drop lists created dynamically, possibly defined in separate template files and with arbitrary DOM relation, without the overhead of having to maintain a separate list of all drop lists that should be connected, and making sure this list is properly updated and propagated to each drop list via change detection.
Instead a statically defined (or could be dynamic) id for the id and cdkConnectedTo inputs will automatically connect all the drop lists without any further coordination from the user.
Similar to what @sroettering mentioned here, but I don’t think a new input property is necessary.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)

Top Related StackOverflow Question
Ah, right. Perhaps a new input property then for a group id.
Thank you for submitting your feature request! Looks like during the polling process it didn’t collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular’s scope, we’d encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.