You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to change order of item (Child item 3) in the same DropList (droplist of Parent item 1), just change order not move into another DropList. But I can not do that, because:
In CdkDropList is method _setupInputSyncSubscription(ref) and in this method is subscription ref.beforeStarted.subscribe(...) in which is called
ref.connectedTo(siblings.filter((
drop => drop && drop !== this)).map(...)
but the filter method filter out .filter(drop => drop && drop !== this) the origin DropList (this) of dragged item and than I am not able to drop back into same DropList to reorder items.
And I know that there is a method _updateActiveDropContainer(...) on DragRef that is trying to handle sorting if I dropping into same DropList but this works just for Parents. Because just if
let newContainer = this._initialContainer._getSiblingContainerFromPosition(this, x, y);
newContainer is undefined then sorting ((this._dropContainer))._sortItem(...)) can happend. But I want to drop back into DropList of children (Parent item 1) and I always get in newContainer DropList of parents and not DropList of children (Parent item 1) because the DropList of children (Parent item 1) was removed in siblings.filter((drop => drop && drop !== this)) as I mentioned above.
I can not place the item where red lines are cause the _this._initialContainer.getSiblingContainerFromPosition(this, x, y) always return DropList of children (red arrow)
or DropList of Parents (red arrow)
Can you remove for next version the filter that removes origin DropList (droplist where dragged item was placed)? Or is there some reason why the filter is there?
Environment
Angular: 8.2.3
CDK/Material: 8.1.3
Browser(s): Chrome Version 80.0.3987.87
Operating System (e.g. Windows, macOS, Ubuntu): Windows 10
The text was updated successfully, but these errors were encountered:
The filter is there, because it doesn't make sense to connect a list to itself. It sounds like you might be hitting a different issue, because the list allows dragging within itself by default.
The filter is there, because it doesn't make sense to connect a list to itself. It sounds like you might be hitting a different issue, because the list allows dragging within itself by default.
By default yes, but just for flat list. If the list is somewhere in hierarchy (droplist in another droplist), than the filter cause this issue.
I have a hierarchy of items.
I would like to change order of item (Child item 3) in the same DropList (droplist of Parent item 1), just change order not move into another DropList. But I can not do that, because:
In CdkDropList is method _setupInputSyncSubscription(ref) and in this method is subscription ref.beforeStarted.subscribe(...) in which is called
but the filter method filter out .filter(drop => drop && drop !== this) the origin DropList (this) of dragged item and than I am not able to drop back into same DropList to reorder items.
And I know that there is a method _updateActiveDropContainer(...) on DragRef that is trying to handle sorting if I dropping into same DropList but this works just for Parents. Because just if
let newContainer = this._initialContainer._getSiblingContainerFromPosition(this, x, y);
newContainer is undefined then sorting ((this._dropContainer))._sortItem(...)) can happend. But I want to drop back into DropList of children (Parent item 1) and I always get in newContainer DropList of parents and not DropList of children (Parent item 1) because the DropList of children (Parent item 1) was removed in siblings.filter((drop => drop && drop !== this)) as I mentioned above.
I can not place the item where red lines are cause the _this._initialContainer.getSiblingContainerFromPosition(this, x, y) always return DropList of children (red arrow)
or DropList of Parents (red arrow)
Can you remove for next version the filter that removes origin DropList (droplist where dragged item was placed)? Or is there some reason why the filter is there?
Environment
The text was updated successfully, but these errors were encountered: