Checkbox - working example -- NumberInput,TextInput - InputAttributes initialization moved to InputBase class #8
Merged
koma
merged 4 commits from features/rewrite/checkbox
into features/rewrite/main
2 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'features/rewrite/checkbox'
Deleting a branch is permanent. It CANNOT be undone. 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.
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
if (Required)
Nested ifs should be joined in single condition, especially if all are single-lined.
if (Required)
{
if (base.InputAttributes.ContainsKey("required")) base.InputAttributes.Add("required", true);
if (!InputAttributes.ContainsKey("required")) InputAttributes.Add("required", true);
See here
using Connected.Utilities;
The line contains an invisible Unicode character that should definitely not be there.
[Parameter]
public string Placeholder { get; set; } = string.Empty;
Should probably be null if uninitialized. Minor detail.
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
42d67dee07
into features/rewrite/main 2 years agoReviewers
42d67dee07
.