Checkbox - working example -- NumberInput,TextInput - InputAttributes initialization moved to InputBase class #8
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "features/rewrite/checkbox"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Checkbox
Pull request contains changes of several components and some styling issues. Some are commented, and as the repeat, please see me for corrections before continuing work.
@ -63,0 +59,4 @@
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
if (Required)
Nested ifs should be joined in single condition, especially if all are single-lined.
@ -63,2 +62,3 @@
if (Required)
{
if (base.InputAttributes.ContainsKey("required")) base.InputAttributes.Add("required", true);
if (!InputAttributes.ContainsKey("required")) InputAttributes.Add("required", true);
See here
@ -1,7 +1,5 @@
using Connected.Utilities;
The line contains an invisible Unicode character that should definitely not be there.
@ -124,4 +122,9 @@ public class InputBase : ComponentBase
[Parameter]
public string Placeholder { get; set; } = string.Empty;
Should probably be null if uninitialized. Minor detail.
@ -127,0 +125,4 @@
protected override async Task OnInitializedAsync()
{
if (InputAttributes is null) InputAttributes = new();
Single line if statements should be braceless, but not inlined, e.g.
instead of