Skip to content

Commit

Permalink
Fixed #14911 - Tree | Node drop points are not contained in a <ul> or…
Browse files Browse the repository at this point in the history
… <ol>
  • Loading branch information
mehmetcetin01140 committed Mar 1, 2024
1 parent 90830b2 commit 64440f0
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions src/app/components/tree/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,17 @@ import {
selector: 'p-treeNode',
template: `
<ng-template [ngIf]="node">
<li
*ngIf="tree.droppableNodes"
class="p-treenode-droppoint"
[ngClass]="{ 'p-treenode-droppoint-active': draghoverPrev }"
(drop)="onDropPoint($event, -1)"
(dragover)="onDropPointDragOver($event)"
(dragenter)="onDropPointDragEnter($event, -1)"
(dragleave)="onDropPointDragLeave($event)"
></li>
<ul>
<li
*ngIf="tree.droppableNodes"
class="p-treenode-droppoint"
[ngClass]="{ 'p-treenode-droppoint-active': draghoverPrev }"
(drop)="onDropPoint($event, -1)"
(dragover)="onDropPointDragOver($event)"
(dragenter)="onDropPointDragEnter($event, -1)"
(dragleave)="onDropPointDragLeave($event)"
></li>
</ul>
<li
*ngIf="!tree.horizontal"
[ngClass]="['p-treenode', node.styleClass || '', isLeaf() ? 'p-treenode-leaf' : '']"
Expand Down Expand Up @@ -133,15 +135,17 @@ import {
></p-treeNode>
</ul>
</li>
<li
*ngIf="tree.droppableNodes && lastChild"
class="p-treenode-droppoint"
[ngClass]="{ 'p-treenode-droppoint-active': draghoverNext }"
(drop)="onDropPoint($event, 1)"
(dragover)="onDropPointDragOver($event)"
(dragenter)="onDropPointDragEnter($event, 1)"
(dragleave)="onDropPointDragLeave($event)"
></li>
<ul>
<li
*ngIf="tree.droppableNodes && lastChild"
class="p-treenode-droppoint"
[ngClass]="{ 'p-treenode-droppoint-active': draghoverNext }"
(drop)="onDropPoint($event, 1)"
(dragover)="onDropPointDragOver($event)"
(dragenter)="onDropPointDragEnter($event, 1)"
(dragleave)="onDropPointDragLeave($event)"
></li>
</ul>
<table *ngIf="tree.horizontal" [class]="node.styleClass">
<tbody>
<tr>
Expand Down

0 comments on commit 64440f0

Please sign in to comment.