completed client state invalidation in multi-user environment
This commit is contained in:
27
Oqtane.Client/UI/PaneLayout.razor
Normal file
27
Oqtane.Client/UI/PaneLayout.razor
Normal file
@ -0,0 +1,27 @@
|
||||
@namespace Oqtane.UI
|
||||
|
||||
@DynamicComponent
|
||||
|
||||
@code {
|
||||
[CascadingParameter]
|
||||
protected PageState PageState { get; set; }
|
||||
|
||||
RenderFragment DynamicComponent { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
DynamicComponent = builder =>
|
||||
{
|
||||
Type layoutType = Type.GetType(PageState.Page.LayoutType);
|
||||
if (layoutType != null)
|
||||
{
|
||||
builder.OpenComponent(0, layoutType);
|
||||
builder.CloseComponent();
|
||||
}
|
||||
else
|
||||
{
|
||||
// layout does not exist with type specified
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user