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