[PR #1927] [MERGED] Added ReadOnly parameter for RadzenSwitch component #2977

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

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/1927
Author: @FrankNWB
Created: 1/28/2025
Status: Merged
Merged: 1/29/2025
Merged by: @enchev

Base: masterHead: readonly-switch


📝 Commits (2)

  • 244e011 Added ReadOnly parameter for RadzenSwitch component
  • a2d0e5e Formatting

📊 Changes

4 files changed (+26 additions, -2 deletions)

View changed files

📝 Radzen.Blazor.Tests/SwitchTests.cs (+13 -0)
📝 Radzen.Blazor/RadzenSwitch.razor (+1 -1)
📝 Radzen.Blazor/RadzenSwitch.razor.cs (+8 -1)
📝 Radzen.Blazor/themes/components/blazor/_switch.scss (+4 -0)

📄 Description

I have noticed that the RadzenSwitch component does not have a ReadOnly parameter. Currently the switch can only be set to Disabled, but this makes it visually different (grayed out) from other ReadOnly components and leads to a non-uniform UI.

This pull request contains all necessary changes (RadzenSwitch-Component, SCSS and UnitTest) for the ReadOnly parameter.

Best regards
Frank


🔄 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/1927 **Author:** [@FrankNWB](https://github.com/FrankNWB) **Created:** 1/28/2025 **Status:** ✅ Merged **Merged:** 1/29/2025 **Merged by:** [@enchev](https://github.com/enchev) **Base:** `master` ← **Head:** `readonly-switch` --- ### 📝 Commits (2) - [`244e011`](https://github.com/radzenhq/radzen-blazor/commit/244e011db7b07c69e4495c8c93abe03028b4af87) Added ReadOnly parameter for RadzenSwitch component - [`a2d0e5e`](https://github.com/radzenhq/radzen-blazor/commit/a2d0e5e27f0af806bfaa22b86799325e54130d9b) Formatting ### 📊 Changes **4 files changed** (+26 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor.Tests/SwitchTests.cs` (+13 -0) 📝 `Radzen.Blazor/RadzenSwitch.razor` (+1 -1) 📝 `Radzen.Blazor/RadzenSwitch.razor.cs` (+8 -1) 📝 `Radzen.Blazor/themes/components/blazor/_switch.scss` (+4 -0) </details> ### 📄 Description I have noticed that the RadzenSwitch component does not have a ReadOnly parameter. Currently the switch can only be set to Disabled, but this makes it visually different (grayed out) from other ReadOnly components and leads to a non-uniform UI. This pull request contains all necessary changes (RadzenSwitch-Component, SCSS and UnitTest) for the ReadOnly parameter. Best regards Frank --- <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:22 +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#2977