[PR #2360] [MERGED] RadzenTocItem: take in attributes to pass on to the list item element #3216

Open
opened 2026-01-29 18:22:28 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/2360
Author: @joriverm
Created: 11/18/2025
Status: Merged
Merged: 11/18/2025
Merged by: @enchev

Base: masterHead: feat/tocItemAttributes


📝 Commits (1)

  • e1d287b RadzenTocItem: take in attributes to pass on to the list item element

📊 Changes

3 files changed (+60 additions, -6 deletions)

View changed files

Radzen.Blazor.Tests/TocTests.cs (+27 -0)
📝 Radzen.Blazor/RadzenTocItem.razor (+1 -1)
📝 Radzen.Blazor/RadzenTocItem.razor.cs (+32 -5)

📄 Description

currently our application is having some problems with blazor not liking the anchor of the Table of content items. this has to do with blazor and the url of the application and is not part of radzen, so no worries there :D

however, to prevent blazor's enhanced navigation from screwing up, we need to add an attribute to the TocItem.
https://github.com/dotnet/aspnetcore/issues/52514
https://github.com/dotnet/aspnetcore/issues/8393
https://github.com/dotnet/aspnetcore/issues/51646
etc etc

but we can't add data-enhance-nav="false" unless the TocItem allows for attributes to be set.
this PR implements attributes for the TocItem, but not the full RadzenComponent to not take in as much overhead.

EDIT: i just realised i can fix our issue by setting the attribute on the RadzenToc itself, which implements RadzenComponent & the attributes. Im ok with this being merged or not, but i think it can be useful to have the attributes like class or style


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/2360 **Author:** [@joriverm](https://github.com/joriverm) **Created:** 11/18/2025 **Status:** ✅ Merged **Merged:** 11/18/2025 **Merged by:** [@enchev](https://github.com/enchev) **Base:** `master` ← **Head:** `feat/tocItemAttributes` --- ### 📝 Commits (1) - [`e1d287b`](https://github.com/radzenhq/radzen-blazor/commit/e1d287ba1409919a3db4977292d959768530dff2) RadzenTocItem: take in attributes to pass on to the list item element ### 📊 Changes **3 files changed** (+60 additions, -6 deletions) <details> <summary>View changed files</summary> ➕ `Radzen.Blazor.Tests/TocTests.cs` (+27 -0) 📝 `Radzen.Blazor/RadzenTocItem.razor` (+1 -1) 📝 `Radzen.Blazor/RadzenTocItem.razor.cs` (+32 -5) </details> ### 📄 Description currently our application is having some problems with blazor not liking the anchor of the Table of content items. this has to do with blazor and the url of the application and is not part of radzen, so no worries there :D however, to prevent blazor's enhanced navigation from screwing up, we need to add an attribute to the TocItem. https://github.com/dotnet/aspnetcore/issues/52514 https://github.com/dotnet/aspnetcore/issues/8393 https://github.com/dotnet/aspnetcore/issues/51646 etc etc but we can't add `data-enhance-nav="false"` unless the TocItem allows for attributes to be set. this PR implements attributes for the TocItem, but not the full RadzenComponent to not take in as much overhead. EDIT: i just realised i can fix our issue by setting the attribute on the RadzenToc itself, which implements RadzenComponent & the attributes. Im ok with this being merged or not, but i think it can be useful to have the attributes like class or style --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:22:28 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#3216