Skip to content

Commit cf8111e

Browse files
authored
Fix issue #275: Description of the changes made (#393)
* Fix issue #275: Description of the changes made - Use the same Delimeter selected to output data file. #275 * Fix typo for 'Delimter' to 'Delimiter' - Fix small type.
1 parent 427aa34 commit cf8111e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

CodeBeam.MudBlazor.Extensions/Components/CsvMapper/MudCsvMapper.razor.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public partial class MudCsvMapper : MudComponentBase
191191
///
192192
/// </summary>
193193
[Parameter]
194-
public string Delimter { get; set; } = ",";
194+
public string Delimiter { get; set; } = ",";
195195

196196
[Inject] private IDialogService? _dialogService { get; set; }
197197
[Inject] private NavigationManager? _navigationManager { get; set; }
@@ -265,7 +265,7 @@ private void CreateCsvContent()
265265
using var reader = new StreamReader(new MemoryStream(FileContentByte ?? new byte[0]), Encoding.Default);
266266
var config = new CsvConfiguration(CultureInfo.InvariantCulture)
267267
{
268-
Delimiter = Delimter,
268+
Delimiter = Delimiter,
269269
IgnoreBlankLines = true,
270270
HasHeaderRecord = true
271271
};
@@ -305,7 +305,8 @@ private async Task OnImport()
305305
{
306306
var config = new CsvHelper.Configuration.CsvConfiguration(CultureInfo.InvariantCulture)
307307
{
308-
PrepareHeaderForMatch = (header) => header.Header
308+
PrepareHeaderForMatch = (header) => header.Header,
309+
Delimiter = Delimiter
309310
};
310311
UpdateHeaderLineWithMatchedFields();
311312
if(!_includeUnmappedData) RemoveUnmappedData();

0 commit comments

Comments
 (0)