Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<MudFileUpload T="IBrowserFile" Accept=".csv" OnFilesChanged="OnInputFileChanged" Hidden="false" Class="flex-1 d-flex justify-center align-content-center my-2"
InputClass="absolute mud-width-full mud-height-full d-flex justify-center align-content-center overflow-hidden z-20" InputStyle="opacity:0"
@ondragenter="@SetDragClass" @ondragleave="@ClearDragClass" @ondragend="@ClearDragClass">
<ActivatorContent>
<CustomContent>
<MudPaper Outlined="true" Class="@("d-flex flex-column justify-center align-content-center mud-background-gray p-2 " + DragClass)">
<MudPaper Elevation="0" class="mud-transparent d-flex justify-center align-content-center">
<svg class="mud-icon-root" viewBox="0 0 24 24" height="75" width="75" style=" height:75px; width:175px;" aria-hidden="true">
Expand All @@ -43,7 +43,7 @@
}
</MudPaper>
</MudPaper>
</ActivatorContent>
</CustomContent>
</MudFileUpload>
</MudStack>

Expand Down Expand Up @@ -71,7 +71,7 @@
var required = item.Required;
var matched = item.MatchedFieldCount > 0;
bool confirmed = _defaultValueHeaders?.ContainsKey(item.Name ?? string.Empty) == true && _defaultValueHeaders[item.Name ?? string.Empty].Confirmed;
string? warning;

Check warning on line 74 in src/CodeBeam.MudBlazor.Extensions.CsvMapper/Components/CsvMapper/MudCsvMapper.razor

View workflow job for this annotation

GitHub Actions / build

The variable 'warning' is assigned but its value is never used

Check warning on line 74 in src/CodeBeam.MudBlazor.Extensions.CsvMapper/Components/CsvMapper/MudCsvMapper.razor

View workflow job for this annotation

GitHub Actions / build

The variable 'warning' is assigned but its value is never used
if (item.AllowDefaultValue)
{
warning = "This field is required. You must either provide a default value or map a field from the imported csv.";
Expand Down Expand Up @@ -109,7 +109,7 @@
}
@if (!matched && item.CreatingDefaultValue)
{
<MudTextField Disabled="@(_defaultValueHeaders?[item.Name ?? string.Empty]?.Confirmed ?? false)" @bind-Value="_defaultValueHeaders[item.Name ?? string.Empty].DefaultValue" Required="@item.Required" RequiredError="@_requiredDefaultValueMessage" Style="margin-top: 10px" Label="@("Default Value" )" Variant="Variant.Text"></MudTextField>

Check warning on line 112 in src/CodeBeam.MudBlazor.Extensions.CsvMapper/Components/CsvMapper/MudCsvMapper.razor

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.

Check warning on line 112 in src/CodeBeam.MudBlazor.Extensions.CsvMapper/Components/CsvMapper/MudCsvMapper.razor

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.
<MudButton OnClick="@(() => SubmitDefaultValue(item.Name))" ButtonType="ButtonType.Submit">@(_defaultValueHeaders[item.Name ?? string.Empty].Confirmed ? "Edit" : "Confirm")</MudButton>
}

Expand Down
Loading