From 12a86347b38f1067eb649a68bf443ff9a1f2c02d Mon Sep 17 00:00:00 2001 From: Kamyab Valipour <51748383+Kamyab7@users.noreply.github.com> Date: Sun, 26 Nov 2023 00:08:06 +0330 Subject: [PATCH] fix(blazorui): correct capitalization of IsReadOnly in BitTextField #5615 (#6129) --- .../Bit.BlazorUI.Tests/TextField/BitTextFieldTests.cs | 2 +- .../TextField/BitTextFieldValidationTest.razor | 2 +- .../Components/Inputs/TextField/BitTextField.razor | 4 ++-- .../Components/Inputs/TextField/BitTextField.razor.cs | 10 +++++----- .../Components/Inputs/TextField/BitTextFieldDemo.razor | 2 +- .../Inputs/TextField/BitTextFieldDemo.razor.cs | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/TextField/BitTextFieldTests.cs b/src/BlazorUI/Bit.BlazorUI.Tests/TextField/BitTextFieldTests.cs index 25ec3f75e1..80ab08d3c2 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/TextField/BitTextFieldTests.cs +++ b/src/BlazorUI/Bit.BlazorUI.Tests/TextField/BitTextFieldTests.cs @@ -83,7 +83,7 @@ public void BitTextFieldShouldTakeBaseParameters(int maxLength, bool isMultiline parameters.Add(p => p.MaxLength, maxLength); parameters.Add(p => p.IsMultiline, isMultiline); parameters.Add(p => p.Placeholder, placeholder); - parameters.Add(p => p.IsReadonly, isReadOnly); + parameters.Add(p => p.IsReadOnly, isReadOnly); }); var bitTextField = component.Find(".bit-txt-inp"); diff --git a/src/BlazorUI/Bit.BlazorUI.Tests/TextField/BitTextFieldValidationTest.razor b/src/BlazorUI/Bit.BlazorUI.Tests/TextField/BitTextFieldValidationTest.razor index 3581928c3c..3f7114be17 100644 --- a/src/BlazorUI/Bit.BlazorUI.Tests/TextField/BitTextFieldValidationTest.razor +++ b/src/BlazorUI/Bit.BlazorUI.Tests/TextField/BitTextFieldValidationTest.razor @@ -5,7 +5,7 @@ IsMultiline="IsMultiline" Type="Type" Placeholder="@Placeholder" - IsReadonly="IsReadOnly" + IsReadOnly="IsReadOnly" IsRequired="IsRequired" IsEnabled="IsEnabled" IconName="@IconName" diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/TextField/BitTextField.razor b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/TextField/BitTextField.razor index f7f7b0b5b3..138a35d42c 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/TextField/BitTextField.razor +++ b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/TextField/BitTextField.razor @@ -54,7 +54,7 @@ class="bit-txt-inp @Classes?.Input" disabled=@(IsEnabled is false) rows="@Rows" - readonly=@IsReadonly + readonly=@IsReadOnly required=@IsRequired maxlength="@MaxLength" placeholder="@Placeholder" @@ -78,7 +78,7 @@ style="@Styles?.Input" class="bit-txt-inp @Classes?.Input" disabled=@(IsEnabled is false) - readonly=@IsReadonly + readonly=@IsReadOnly required=@IsRequired type="@_inputType" value="@CurrentValue" diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/TextField/BitTextField.razor.cs b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/TextField/BitTextField.razor.cs index 72b4445c31..dd2a3eeacd 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Inputs/TextField/BitTextField.razor.cs +++ b/src/BlazorUI/Bit.BlazorUI/Components/Inputs/TextField/BitTextField.razor.cs @@ -6,7 +6,7 @@ public partial class BitTextField { private bool hasBorder = true; private bool isMultiline; - private bool isReadonly; + private bool isReadOnly; private bool isRequired; private bool isUnderlined; private bool isResizable = true; @@ -93,14 +93,14 @@ public bool IsMultiline /// If true, the text field is readonly. /// [Parameter] - public bool IsReadonly + public bool IsReadOnly { - get => isReadonly; + get => isReadOnly; set { - if (isReadonly == value) return; + if (isReadOnly == value) return; - isReadonly = value; + isReadOnly = value; ClassBuilder.Reset(); } } diff --git a/src/BlazorUI/Demo/Client/Core/Pages/Components/Inputs/TextField/BitTextFieldDemo.razor b/src/BlazorUI/Demo/Client/Core/Pages/Components/Inputs/TextField/BitTextFieldDemo.razor index f376382214..1cee86d36b 100644 --- a/src/BlazorUI/Demo/Client/Core/Pages/Components/Inputs/TextField/BitTextFieldDemo.razor +++ b/src/BlazorUI/Demo/Client/Core/Pages/Components/Inputs/TextField/BitTextFieldDemo.razor @@ -19,7 +19,7 @@

- +

diff --git a/src/BlazorUI/Demo/Client/Core/Pages/Components/Inputs/TextField/BitTextFieldDemo.razor.cs b/src/BlazorUI/Demo/Client/Core/Pages/Components/Inputs/TextField/BitTextFieldDemo.razor.cs index 8c3f15a6a8..c7435108eb 100644 --- a/src/BlazorUI/Demo/Client/Core/Pages/Components/Inputs/TextField/BitTextFieldDemo.razor.cs +++ b/src/BlazorUI/Demo/Client/Core/Pages/Components/Inputs/TextField/BitTextFieldDemo.razor.cs @@ -71,7 +71,7 @@ public partial class BitTextFieldDemo }, new() { - Name = "IsReadonly", + Name = "IsReadOnly", Type = "bool", DefaultValue = "false", Description = "If true, the text field is readonly.", @@ -453,7 +453,7 @@ private void HandleInvalidSubmit() - +