diff --git a/src/app/components/table/table.css b/src/app/components/table/table.css index fe1acbbc9e6..2f9ff46c073 100755 --- a/src/app/components/table/table.css +++ b/src/app/components/table/table.css @@ -141,7 +141,6 @@ .p-datatable-reorder-indicator-up, .p-datatable-reorder-indicator-down { position: absolute; - display: none; } .p-datatable-reorderablerow-handle { diff --git a/src/app/components/table/table.ts b/src/app/components/table/table.ts index 48d55cfc57b..c1f209b7365 100644 --- a/src/app/components/table/table.ts +++ b/src/app/components/table/table.ts @@ -222,8 +222,8 @@ export class TableService { - - + + `, providers: [TableService], @@ -2051,14 +2051,8 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable this.reorderIndicatorDownViewChild.nativeElement.style.left = targetLeft - Math.ceil(this.reorderIconWidth / 2) + 'px'; this.dropPosition = -1; } - - if ((dropIndex - dragIndex === 1 && this.dropPosition === -1) || (dropIndex - dragIndex === -1 && this.dropPosition === 1)) { - this.reorderIndicatorUpViewChild.nativeElement.style.display = 'none'; - this.reorderIndicatorDownViewChild.nativeElement.style.display = 'none'; - } else { - this.reorderIndicatorUpViewChild.nativeElement.style.display = 'block'; - this.reorderIndicatorDownViewChild.nativeElement.style.display = 'block'; - } + this.reorderIndicatorUpViewChild.nativeElement.style.display = 'block'; + this.reorderIndicatorDownViewChild.nativeElement.style.display = 'block'; } else { event.dataTransfer.dropEffect = 'none'; } @@ -2068,8 +2062,6 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable onColumnDragLeave(event) { if (this.reorderableColumns && this.draggedColumn) { event.preventDefault(); - this.reorderIndicatorUpViewChild.nativeElement.style.display = 'none'; - this.reorderIndicatorDownViewChild.nativeElement.style.display = 'none'; } }