Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm building a Blazor app using Ant Design Docs | Nuget

The code below displays a popover when the user clicks on the image, but once the popover has been displayed I'd like to fire off an HTTP request, and then update the content of the popover when I get the response.

The previous version of the system used ASP.NET MVC and Bootstrap, and I used the show.bs.popover event to trigger the request, but the Ant popover doesn't seem to have any events.

What's the best way to do this?

@if (Tracker.LatestLocationMessage is not null)
{
    <Popover ContentTemplate="@PopoverContent" Title="what3words" Trigger="@(new[] { TriggerType.Click})" Placement="PlacementType.LeftTop">
        <AntDesign.Button Type="link">
            <img src="images/w3w.svg" width="18" height="18" title="what3words" alt="What 3 Words" />
        </AntDesign.Button>
    </Popover>
}

@code {
    [Parameter]
    public Tracker Tracker { get; set; }

    private RenderFragment PopoverContent =>@<div><i class="fal fa-circle-notch fa-spin fa-lg"></i><span>Requesting words...</span></div>;
}

question from:https://stackoverflow.com/questions/66055319/updating-content-of-blazor-popover-using-ant-design

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
324 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...