Skip to content

Commit 7f2ca78

Browse files
committed
[DSC-1603] Fix issue on drag end
1 parent 61e8009 commit 7f2ca78

3 files changed

Lines changed: 3 additions & 13 deletions

File tree

src/app/shared/form/chips/chips.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<a class="flex-sm-fill text-sm-center nav-link active bg-info"
2121
cdkDrag
2222
(cdkDragStarted)="onDrag(i)"
23-
href="javascript:void(0);"
23+
href="#"
2424
[class.disabled]="!clickable || (editable && c.editMode) || dragged == i "
2525
[class.chip-selected]="(editable && c.editMode) || dragged == i"
2626
(click)="chipsSelected($event, i);">

src/app/shared/form/chips/chips.component.scss

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
//.example-custom-placeholder {
2-
//background: #ccc;
3-
//border: none;
4-
//min-height: 30px;
5-
//border: 2px solid red;
6-
//}
7-
81
.cdk-drag-placeholder {
92
filter: grayscale(100%);
103
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
114
}
5+
126
.cdk-drag-preview {
137
color: white;
148
box-sizing: border-box;
@@ -17,11 +11,6 @@
1711
0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);
1812
}
1913

20-
//.example-drag-preview.nav-item {
21-
// margin-right: 2px;
22-
// margin-bottom: 1px;
23-
//}
24-
2514
.chip-stacked-icons {
2615
display: inline-block;
2716
position: relative;

src/app/shared/form/chips/chips.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export class ChipsComponent implements OnChanges {
8585

8686
onDrop(event: CdkDragDrop<ChipsItem[]>) {
8787
moveItemInArray(this.chips.chipsItems.getValue(), event.previousIndex, event.currentIndex);
88+
this.dragged = -1;
8889
this.chips.updateOrder();
8990
this.isDragging.next(false);
9091
}

0 commit comments

Comments
 (0)