File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -8383,9 +8383,10 @@ public async Task AutoFitContentCallback_Ok()
83838383 pb . Add ( a => a . AllowDragColumn , true ) ;
83848384 pb . Add ( a => a . ClientTableName , "table-unit-test" ) ;
83858385 pb . Add ( a => a . OnQueryAsync , OnQueryAsync ( localizer ) ) ;
8386- pb . Add ( a => a . OnAutoFitContentAsync , fieldName =>
8386+ pb . Add ( a => a . OnAutoFitContentAsync , ( fieldName , calcWidth ) =>
83878387 {
83888388 name = fieldName ;
8389+ var resWidth = Math . Max ( 100.65f , calcWidth ) ;
83898390 return Task . FromResult ( 100.65f ) ;
83908391 } ) ;
83918392 pb . Add ( a => a . TableColumns , foo => builder =>
@@ -8405,7 +8406,7 @@ public async Task AutoFitContentCallback_Ok()
84058406
84068407 var table = cut . FindComponent < Table < Foo > > ( ) ;
84078408 float v = 0f ;
8408- await cut . InvokeAsync ( async ( ) => v = await table . Instance . AutoFitContentCallback ( "DateTime" ) ) ;
8409+ await cut . InvokeAsync ( async ( ) => v = await table . Instance . AutoFitContentCallback ( "DateTime" , 90 ) ) ;
84098410 Assert . Equal ( 100.65f , v ) ;
84108411 }
84118412
You can’t perform that action at this time.
0 commit comments