Browse Source

Make `layout` nullable.

pull/17431/head
maliming 3 years ago
parent
commit
f926804dbe
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs
  2. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/ViewComponentHelperLayoutHookExtensions.cs

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/LayoutHookViewComponent.cs

@ -16,7 +16,7 @@ public class LayoutHookViewComponent : AbpViewComponent
Options = options.Value;
}
public virtual IViewComponentResult Invoke(string name, string layout)
public virtual IViewComponentResult Invoke(string name, string? layout)
{
var hooks = Options.Hooks.GetOrDefault(name)?
.Where(IsViewComponent)

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Components/LayoutHook/ViewComponentHelperLayoutHookExtensions.cs

@ -9,7 +9,7 @@ public static class ViewComponentHelperLayoutHookExtensions
public static Task<IHtmlContent> InvokeLayoutHookAsync(
this IViewComponentHelper componentHelper,
string name,
string layout)
string? layout = null)
{
return componentHelper.InvokeAsync(
typeof(LayoutHookViewComponent),

Loading…
Cancel
Save