-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layout = "top" with RightContentRender #67
Comments
OK, it looks like we have to use |
hi @michaelcsikos have you fixed this issue . is there any workaround available? |
This is what worked for me: <AntDesign.ProLayout.BasicLayout>
<HeaderContentRender>
<MenuDark Mode = "MenuMode.Horizontal" MenuData = "MenuData" />
</HeaderContentRender>
<RightContentRender>
<RightContent />
</RightContentRender>
<ChildContent>
@Body
</ChildContent>
</AntDesign.ProLayout.BasicLayout>
@code
{
private MenuDataItem[] MenuData { get; set; } = { };
protected async override Task OnInitializedAsync()
{
await base.OnInitializedAsync();
var list = new List<MenuDataItem>();
// Set up menu options based on current user privileges, etc
var menuContacts = new MenuDataItem
{
Path = "/contact/list",
Name = "Contacts",
Key = "Contacts",
Icon = "team",
Children = new[]
{
new MenuDataItem
{
Path = "/contact/list",
Name = "All contacts",
Key = "All contacts",
},
new MenuDataItem
{
Path = "/contact/list/staff",
Name = "Staff",
Key = "Staff",
},
new MenuDataItem
{
Path = "/contact/list/customer",
Name = "Customers",
Key = "Customers",
},
},
};
list.Add(menuContacts);
MenuData = list.ToArray();
}
}
|
@michaelcsikos could you please mention you Ant Design version because I am unable to find MenuDark? |
@Aamirkhan10218 Oh, sorry, that's one of my razor files. It just sets the @* MenuDark.razor *@
@inherits BaseMenu
@{
base.BuildRenderTree(__builder);
}
@code
{
protected override void OnInitialized()
{
NavTheme = MenuTheme.Dark;
base.OnInitialized();
}
}
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @ElderJames when
Layout = "top"
theRightContentRender
is ignored. How can we get this to work?The text was updated successfully, but these errors were encountered: