C#C
C#15mo ago
Saiyanslayer

MudBlazor DropContainer not triggering ItemDropped

I have the following MudBlazor MudDropContainer:
<!-- Dropzone for reorganizing and editing the Check Items -->
<MudDropContainer T="CustomDropItem" @ref="_dropContainer" Class="align-center justify-start" 
        Items=@_items
        ItemPicked=@ItemSelected
        ItemDropped=@ItemUpdated
        ItemsSelector=@((item, dropzone) => item.Selector == dropzone)
        ApplyDropClassesOnDragStarted
        >
    <ChildContent>
         <MudDropZone T="CustomDropItem" Class="flex-grow-1" AllowReorder Identifier=@DropzoneId />
    </ChildContent>
    <ItemRenderer>
         <MudStack StretchItems=@StretchItems.Start Class="ma-3">
            <MudStack Row Class="py-n3 my-0" Style=@($"background-color: {context.Value.Colour};")
                AlignItems="AlignItems.Center" Justify="Justify.FlexStart">

                <MudPopover Class="mud-theme-default py-1 my-1" Open="@(_editIndex == context.SortOrder)"
                    AnchorOrigin="Origin.CenterLeft" TransformOrigin="Origin.CenterRight">

                    <!-- Content based on the type of TaskValue -->
                </MudPopover>
            </MudStack>
        </MudStack>
    </ItemRenderer>
</MudDropContainer>


This was working in v6 but since I updated to v7, I cant get ItemDropped to trigger. The transaction keeps failing.
Was this page helpful?