Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rickers1 opened this issue Mar 17, 2024 · 0 comments

Comments

@rickers1
Copy link

rickers1 commented Mar 17, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant