Skip to content

Angular drag and drop cdk is not scrolling container when dragging #16657

@fatmaE19

Description

@fatmaE19

I am developping a frontend app in which i am using angular 7.I am using angular cdk for dragging and dropping elements but the problem is when i make a drag the div container is not scrolling.So is there any sollution for that.

https://angular-2cdcbb.stackblitz.io

this is my html

box

this is my css

.col_container {
height: 300px;
width: 10%;
margin: 0 auto;
padding: 10px;
background-color: yellow;
overflow-x: auto;
overflow-y: auto;
border-style: solid;
border-width: 0.1px;
border-color: black;
}
.column {

color: blue;
background-color: azure;
border-style: solid;
border-width: 0.1px;
border-color: black;
display: inline-block;
width: 30px;
margin: 0 6px;
vertical-align:top;

}
this is my component

@component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
title = 'scrollTestForDragAndDrop';
}
the expected behaviour is when i drag the box to the border the yellow div must scroll

Metadata

Metadata

Assignees

No one assigned

    Labels

    troubleshootingThis issue is not reporting an issue, but just asking for help

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions