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
stm commented 2 years ago
Collaborator

Checkbox

Checkbox
koma was assigned by stm 2 years ago
stm added 1 commit 2 years ago
stm added 1 commit 2 years ago
stm added 1 commit 2 years ago
stm added 1 commit 2 years ago
koma requested changes 2 years ago
koma left a comment
Owner

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.

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)
koma commented 2 years ago
Owner

Nested ifs should be joined in single condition, especially if all are single-lined.

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);
koma commented 2 years ago
Owner

See here

See [here](https://git.tompit.com/Connected/Connected.Components/pulls/8/files#issuecomment-141)
using Connected.Utilities;
koma commented 2 years ago
Owner

The line contains an invisible Unicode character that should definitely not be there.

The line contains an invisible Unicode character that should definitely not be there.
[Parameter]
public string Placeholder { get; set; } = string.Empty;
koma commented 2 years ago
Owner

Should probably be null if uninitialized. Minor detail.

Should probably be null if uninitialized. Minor detail.
protected override async Task OnInitializedAsync()
{
if (InputAttributes is null) InputAttributes = new();
koma commented 2 years ago
Owner

Single line if statements should be braceless, but not inlined, e.g.

if(bool)
	DoSth();

instead of

if(bool) DoSth();
Single line if statements should be braceless, but not inlined, e.g. ``` if(bool) DoSth(); ``` instead of ``` if(bool) DoSth(); ```
koma merged commit 42d67dee07 into features/rewrite/main 2 years ago

Reviewers

koma requested changes 2 years ago
The pull request has been merged as 42d67dee07.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: Connected/Connected.Components#8
Loading…
There is no content yet.