Open Closed

Implementing the Off Canvas modal in Bootstrap for New/Edit forms for Entities. Perhaps using the apb-modal Tag Helder? #2739


User avatar
0
jtallon created
  • ABP Framework version: latest (5.2)
  • UI type: MVC
  • DB provider: EF Core

Is there a way to get the details forms to open the same way as we can with the Off-Canvas CSS in bootstrap?

For example https://getbootstrap.com/docs/5.0/components/offcanvas/

I'd like this to open for the majority of the entity forms, but not all.

Regards


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can replace AbpModalTagHelperService with your own implementation to build HTML code(also AbpModalHeaderTagHelperService, AbpModalFooterTagHelperService, AbpModalBodyTagHelperService): https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Modal/AbpModalTagHelperService.cs

    For example:

    [ExposeServices(typeof(AbpModalTagHelperService))]
    public class MyAbpModalTagHelperService : AbpModalTagHelperService
    {
        protected override void SetContent(TagHelperContext context, TagHelperOutput output, TagHelperContent childContent)
        {
            //.....
            base.SetContent(context, output, childContent);
        }
    }
    
Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09