From 248d39378f201b0c8c4b12a52e0db406af8f7c19 Mon Sep 17 00:00:00 2001 From: David Moreira Date: Wed, 25 Oct 2023 13:35:08 +0100 Subject: [PATCH] Centralize HelpText feature in _DataGridcell --- Source/Extensions/Blazorise.DataGrid/_DataGridCell.razor | 7 +++++++ .../Extensions/Blazorise.DataGrid/_DataGridCellEdit.razor | 7 ------- .../Blazorise.DataGrid/_DataGridCellEditValidation.razor | 7 ------- Source/Extensions/Blazorise.DataGrid/_DataGridModal.razor | 6 ------ .../Extensions/Blazorise.DataGrid/_DataGridRowEdit.razor | 6 ------ 5 files changed, 7 insertions(+), 26 deletions(-) diff --git a/Source/Extensions/Blazorise.DataGrid/_DataGridCell.razor b/Source/Extensions/Blazorise.DataGrid/_DataGridCell.razor index bd02016ca3..1ec2501a12 100644 --- a/Source/Extensions/Blazorise.DataGrid/_DataGridCell.razor +++ b/Source/Extensions/Blazorise.DataGrid/_DataGridCell.razor @@ -50,4 +50,11 @@ else } } } +} + +@if ( !string.IsNullOrWhiteSpace( Column.HelpText ) ) +{ + + @Column.HelpText + } \ No newline at end of file diff --git a/Source/Extensions/Blazorise.DataGrid/_DataGridCellEdit.razor b/Source/Extensions/Blazorise.DataGrid/_DataGridCellEdit.razor index b535f33753..7fa640bf20 100644 --- a/Source/Extensions/Blazorise.DataGrid/_DataGridCellEdit.razor +++ b/Source/Extensions/Blazorise.DataGrid/_DataGridCellEdit.razor @@ -55,11 +55,4 @@ else if ( ValueType == typeof( TimeSpan? ) ) else { -} - -@if ( !string.IsNullOrWhiteSpace( Column.HelpText ) ) -{ - - @Column.HelpText - } \ No newline at end of file diff --git a/Source/Extensions/Blazorise.DataGrid/_DataGridCellEditValidation.razor b/Source/Extensions/Blazorise.DataGrid/_DataGridCellEditValidation.razor index 4d6721f14d..e496a44276 100644 --- a/Source/Extensions/Blazorise.DataGrid/_DataGridCellEditValidation.razor +++ b/Source/Extensions/Blazorise.DataGrid/_DataGridCellEditValidation.razor @@ -263,11 +263,4 @@ else } -} - -@if ( !string.IsNullOrWhiteSpace( Column.HelpText ) ) -{ - - @Column.HelpText - } \ No newline at end of file diff --git a/Source/Extensions/Blazorise.DataGrid/_DataGridModal.razor b/Source/Extensions/Blazorise.DataGrid/_DataGridModal.razor index b00ade84e8..4fd4b26775 100644 --- a/Source/Extensions/Blazorise.DataGrid/_DataGridModal.razor +++ b/Source/Extensions/Blazorise.DataGrid/_DataGridModal.razor @@ -42,12 +42,6 @@ <_DataGridCell TItem="TItem" Column="@column" Item="@EditItem" ValidationItem="@ValidationItem" CellEditContext="@EditItemCellValues[column.ElementId]" ShowValidationFeedback="@ParentDataGrid.ShowValidationFeedback" /> - @if ( !string.IsNullOrWhiteSpace( column.HelpText ) ) - { - - @column.HelpText - - } } @{ diff --git a/Source/Extensions/Blazorise.DataGrid/_DataGridRowEdit.razor b/Source/Extensions/Blazorise.DataGrid/_DataGridRowEdit.razor index fb69cb7e58..1ac17bcae9 100644 --- a/Source/Extensions/Blazorise.DataGrid/_DataGridRowEdit.razor +++ b/Source/Extensions/Blazorise.DataGrid/_DataGridRowEdit.razor @@ -23,12 +23,6 @@ <_DataGridCell TItem="TItem" Column="@column" Item="@Item" ValidationItem="@ValidationItem" CellEditContext="@CellValues[column.ElementId]" ShowValidationFeedback="@ParentDataGrid.ShowValidationFeedback" /> - @if ( !string.IsNullOrWhiteSpace( column.HelpText ) ) - { - - @column.HelpText - - } }