Starts in:
2 DAYS
9 HRS
31 MIN
39 SEC
Starts in:
2 D
9 H
31 M
39 S
Open Closed

Confirmation Popup #1024


User avatar
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)
  • User Avatar
    0
    ilkayilknur created

    Hi, You can inject IUiMessageService and call Confirm method to display a confirmation modal. See https://docs.abp.io/en/abp/latest/UI/Blazor/Message#confirmation-message

  • User Avatar
    0
    Leonardo.Willrich created

    Thank you very much! That works fine for me. I didn't notice that part of documents for ABP Framework > UI > Blazor before.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06