@@ -135,11 +135,21 @@ else if ( EditMode == DataGridEditMode.Inline || EditMode == DataGridEditMode.Ce
135135 else if ( column .Displaying )
136136 {
137137 var cellStyle = column .BuildCellStyle ( Item );
138+ var isCustomEditTemplate = column .EditTemplate is not null ;
139+ var cellEditWrapperStyle = isCustomEditTemplate
140+ ? " width:100%;max-width:100%;min-width:0;"
141+ : " width:100%;max-width:100%;min-width:0;overflow:hidden;" ;
142+
138143 if ( column .CellValueIsEditable )
139144 {
140145 cellStyle = string .IsNullOrWhiteSpace ( cellStyle )
141- ? " min-width:0;overflow:hidden;"
142- : $" {cellStyle };min-width:0;overflow:hidden;" ;
146+ ? " min-width:0;"
147+ : $" {cellStyle };min-width:0;" ;
148+
149+ if ( ! isCustomEditTemplate )
150+ {
151+ cellStyle = $" {cellStyle };overflow:hidden;" ;
152+ }
143153
144154 if ( column .CellEditing && ! string .IsNullOrWhiteSpace ( ParentDataGrid .activeCellEditWidth ) )
145155 {
@@ -149,15 +159,15 @@ else if ( EditMode == DataGridEditMode.Inline || EditMode == DataGridEditMode.Ce
149159
150160 <TableRowCell @key =column Class =" @column.CellClass?.Invoke( Item )" Style =" @cellStyle"
151161 data-column-id =" @column.ElementId"
152- @onkeydown =" @(ParentDataGrid.IsCellEdit? async( args) => await HandleCellKeyDown( args, column ) : default)"
162+ @onkeydown =" @(ParentDataGrid.IsCellEdit ? async ( args ) => await HandleCellKeyDown( args, column ) : default)"
153163 @onclick =@(ParentDataGrid.IsCellEditOnSingleClick && !column.CellValueIsEditable ? async () => await HandleCellClick ( column ) : default )
154164 @ondblclick = @(ParentDataGrid .IsCellEditOnDoubleClick && ! column .CellValueIsEditable ? async () => await HandleCellClick ( column ) : default )
155165 TextAlignment = " @column.TextAlignment" TextTransform = " @column.TextTransform" TextDecoration = " @column.TextDecoration" TextWeight = " @column.TextWeight" TextOverflow = " @column.TextOverflow" TextSize = " @column.TextSize"
156166 VerticalAlignment = " @column.VerticalAlignment" Display = " @column.Display" Flex = " @column.Flex" Gap = " @column.Gap" FixedPosition = " @column.FixedPosition" Width = " @column.Width"
157167 MobileModeCaption = " @column.Caption" >
158168 @if ( column .CellValueIsEditable )
159169 {
160- < Div Style = " width:100%;max-width:100%;min-width:0;overflow:hidden; " >
170+ < Div Style = " @cellEditWrapperStyle " >
161171 < _DataGridCell TItem = " TItem" Column = " @column" Item = " @Item" ValidationItem = " @ValidationItem" CellEditContext = " @CellValues[column.ElementId]" ShowValidationFeedback = " @ParentDataGrid.ShowValidationFeedback" / >
162172 < / Div >
163173 }
0 commit comments