Skip to content

PDTree drag and drop with custom NodeTemplate doesn't have a PlaceHolder? #38

@rickers1

Description

@rickers1

I am using

<PDDragContext>
     <PDTree //...>
           <NodeTemplate>
                // My template followed by ...
               <MudIconButton ButtonType="ButtonType.Button"
                                            Size="MudBlazor.Size.Small"
                                            Icon="@Icons.Material.Filled.Delete"
                                            Color="Color.Error"
                                            OnClick="() => ItemDelete(PDTreeCtx)">
                </MudIconButton>
           </NodeTemplate>
     </PDTree>
</PDDragContext>

It works fine except that when I drag an item the placeholder shows as the whole PDTree not just the PDTreeNode I am dragging. If I remove the MudIconButton from the NodeTemplate it works as expected with the placeholder being only the PDTreeNode I am dragging.

Is there something I am missing here in the setup?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions