0
Leonardo.Willrich created
- ABP Framework version: v4.2.2
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes / no
- Exception message and stack trace:
- Steps to reproduce the issue:
Hi,
I wonder if there is an option for confirmation popups for Blazor template such as in ABP Framework?
For example: https://docs.abp.io/en/abp/latest/UI/Angular/Confirmation-Service https://aspnetboilerplate.com/Pages/Documents/Javascript-API/Message
To create a confirmation poup I create a Modal in my razor page. But, I don't want to do that always, it would be awesome if there was some to do that easily.
My code:
<Modal @ref="ActiveConfirmationModal">
<ModalContent Centered="true">
<ModalHeader>
<ModalTitle>@L["SupplyNetwork:DesactiveTitle"]</ModalTitle>
<CloseButton />
</ModalHeader>
<ModalBody>
@L["SupplyNetwork:DesactiveMessage"]
</ModalBody>
<ModalFooter>
<Button Color="Color.Primary" Clicked="@(() => ActiveConfirmationModal.Hide())">@L["Button:Yes"]</Button>
<Button Color="Color.Secondary" Clicked="CancelActiveCheck">@L["Button:No"]</Button>
</ModalFooter>
</ModalContent>
</Modal>
2 Answer(s)
-
0
Hi, You can inject
IUiMessageService
and callConfirm
method to display a confirmation modal. See https://docs.abp.io/en/abp/latest/UI/Blazor/Message#confirmation-message -
0
Thank you very much! That works fine for me. I didn't notice that part of documents for ABP Framework > UI > Blazor before.