[PR #1970] [MERGED] [IMPROVEMENT] - Adding new option to disable radzen link, css and test added. #2999

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

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/1970
Author: @pedro-cons
Created: 2/15/2025
Status: Merged
Merged: 2/17/2025
Merged by: @enchev

Base: masterHead: rz-link-disabled


📝 Commits (3)

  • 47db591 [IMPROVEMENT] - Adding new option to disable radzen link, css and test added.
  • 1200f73 [IMPROVEMENT] - Leaving the title with lowercase letter.
  • db0baa7 [IMPROVEMENT] - Removing version items.

📊 Changes

13 files changed (+100 additions, -37 deletions)

View changed files

📝 Radzen.Blazor.Tests/LinkTests.cs (+14 -0)
📝 Radzen.Blazor/RadzenLink.razor (+1 -1)
📝 Radzen.Blazor/RadzenLink.razor.cs (+30 -6)
📝 Radzen.Blazor/RadzenTree.razor.cs (+3 -4)
📝 Radzen.Blazor/themes/components/blazor/_breadcrumb.scss (+5 -0)
📝 Radzen.Blazor/themes/components/blazor/_link.scss (+27 -22)
RadzenBlazorDemos/Pages/LinkDisabled.razor (+3 -0)
📝 RadzenBlazorDemos/Pages/LinkPage.razor (+7 -0)
📝 RadzenBlazorDemos/wwwroot/css/fluent-base.css (+1 -1)
📝 RadzenBlazorDemos/wwwroot/css/fluent-dark-base.css (+1 -1)
📝 RadzenBlazorDemos/wwwroot/css/material3-base.css (+1 -1)
📝 RadzenBlazorDemos/wwwroot/css/material3-dark-base.css (+1 -1)
📝 RadzenBlazorDemos/wwwroot/css/site.css (+6 -0)

📄 Description

Enhancement: Disabled Property for RadzenLink

I've added a new feature to the RadzenLink component, allowing it to be disabled, similar to the disabled property in other components. This enhancement provides better control over link interactions, improving usability in scenarios where navigation should be temporarily restricted.

Example:
<RadzenLink Icon="block" Disabled="true" Path="button" Text="This link is disabled and cannot be accessed" />

There's already an open issue for this enhancement: #1870.

Added a new bool Disabled property to the RadzenLink component. When set to true, it applies the rz-link-disabled class, reducing opacity by 50% and disabling click events. When re-enabled, all functionalities return to normal, as demonstrated in the video below.

https://github.com/user-attachments/assets/7e94e8a4-8822-4204-8c61-459c59eeae2d

Additionally, a new test, Link_Renders_DisabledParameter, has been added to Radzen.Blazor.Tests to validate the disabled state of the link.

Looking forward to your feedback!


🔄 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/1970 **Author:** [@pedro-cons](https://github.com/pedro-cons) **Created:** 2/15/2025 **Status:** ✅ Merged **Merged:** 2/17/2025 **Merged by:** [@enchev](https://github.com/enchev) **Base:** `master` ← **Head:** `rz-link-disabled` --- ### 📝 Commits (3) - [`47db591`](https://github.com/radzenhq/radzen-blazor/commit/47db591ec88e0da567187ce865e95071140b7b3a) [IMPROVEMENT] - Adding new option to disable radzen link, css and test added. - [`1200f73`](https://github.com/radzenhq/radzen-blazor/commit/1200f730608f5b10b635e874755f3d23dfa46b06) [IMPROVEMENT] - Leaving the title with lowercase letter. - [`db0baa7`](https://github.com/radzenhq/radzen-blazor/commit/db0baa7cff2da63cc02646452c25baae938d1169) [IMPROVEMENT] - Removing version items. ### 📊 Changes **13 files changed** (+100 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor.Tests/LinkTests.cs` (+14 -0) 📝 `Radzen.Blazor/RadzenLink.razor` (+1 -1) 📝 `Radzen.Blazor/RadzenLink.razor.cs` (+30 -6) 📝 `Radzen.Blazor/RadzenTree.razor.cs` (+3 -4) 📝 `Radzen.Blazor/themes/components/blazor/_breadcrumb.scss` (+5 -0) 📝 `Radzen.Blazor/themes/components/blazor/_link.scss` (+27 -22) ➕ `RadzenBlazorDemos/Pages/LinkDisabled.razor` (+3 -0) 📝 `RadzenBlazorDemos/Pages/LinkPage.razor` (+7 -0) 📝 `RadzenBlazorDemos/wwwroot/css/fluent-base.css` (+1 -1) 📝 `RadzenBlazorDemos/wwwroot/css/fluent-dark-base.css` (+1 -1) 📝 `RadzenBlazorDemos/wwwroot/css/material3-base.css` (+1 -1) 📝 `RadzenBlazorDemos/wwwroot/css/material3-dark-base.css` (+1 -1) 📝 `RadzenBlazorDemos/wwwroot/css/site.css` (+6 -0) </details> ### 📄 Description **Enhancement: Disabled Property for RadzenLink** I've added a new feature to the RadzenLink component, allowing it to be disabled, similar to the disabled property in other components. This enhancement provides better control over link interactions, improving usability in scenarios where navigation should be temporarily restricted. **Example:** `<RadzenLink Icon="block" Disabled="true" Path="button" Text="This link is disabled and cannot be accessed" />` There's already an open issue for this enhancement: [#1870](https://github.com/radzenhq/radzen-blazor/issues/1870). Added a new bool Disabled property to the RadzenLink component. When set to true, it applies the rz-link-disabled class, reducing opacity by 50% and disabling click events. When re-enabled, all functionalities return to normal, as demonstrated in the video below. https://github.com/user-attachments/assets/7e94e8a4-8822-4204-8c61-459c59eeae2d Additionally, a new test, Link_Renders_DisabledParameter, has been added to Radzen.Blazor.Tests to validate the disabled state of the link. Looking forward to your feedback! --- <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:21: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#2999