File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Razor" >
22
33 <PropertyGroup >
4- <Version >9.6.5-beta01 </Version >
4+ <Version >9.6.5-beta02 </Version >
55 </PropertyGroup >
66
77 <ItemGroup >
Original file line number Diff line number Diff line change @@ -545,6 +545,7 @@ public async Task EditAsync()
545545 if ( SelectedRows . Count == 1 )
546546 {
547547 // 检查是否选中了不可编辑行(行内无编辑按钮),同时检查按钮禁用状态(禁用时不可编辑)
548+ // ShowExtendEditButton 不参与逻辑,不显示扩展编辑按钮时用户可能自定义按钮调用 EditAsync 方法
548549 if ( ProhibitEdit ( ) )
549550 {
550551 // 提示不可编辑
@@ -1004,12 +1005,10 @@ protected async Task<bool> ConfirmDelete()
10041005 }
10051006
10061007 private bool ProhibitEdit ( ) => ( ShowExtendEditButtonCallback != null && ! ShowExtendEditButtonCallback ( SelectedRows [ 0 ] ) )
1007- || ! ShowExtendEditButton
1008- || ( DisableExtendEditButtonCallback != null && DisableExtendEditButtonCallback ( SelectedRows [ 0 ] ) )
1009- || DisableExtendEditButton ;
1008+ || ( DisableExtendEditButtonCallback != null && DisableExtendEditButtonCallback ( SelectedRows [ 0 ] ) )
1009+ || DisableExtendEditButton ;
10101010
10111011 private bool ProhibitDelete ( ) => ( ShowExtendDeleteButtonCallback != null && SelectedRows . Any ( i => ! ShowExtendDeleteButtonCallback ( i ) ) )
1012- || ! ShowExtendDeleteButton
10131012 || ( DisableExtendDeleteButtonCallback != null && SelectedRows . Any ( x => DisableExtendDeleteButtonCallback ( x ) ) )
10141013 || DisableExtendDeleteButton ;
10151014
Original file line number Diff line number Diff line change @@ -8679,8 +8679,10 @@ public void Modify_Ok()
86798679 pb . Add ( a => a . ShowExtendEditButton , false ) ;
86808680 pb . Add ( a => a . ShowExtendDeleteButton , false ) ;
86818681 } ) ;
8682- Assert . True ( ProhibitEdit ( cut . Instance ) ) ;
8683- Assert . True ( ProhibitDelete ( cut . Instance ) ) ;
8682+
8683+ // 不显示编辑删除按钮不参与是否可编辑删除判断,用户可能自定义按钮编辑或者删除当前行
8684+ Assert . False ( ProhibitEdit ( cut . Instance ) ) ;
8685+ Assert . False ( ProhibitDelete ( cut . Instance ) ) ;
86848686
86858687 cut . SetParametersAndRender ( pb =>
86868688 {
You can’t perform that action at this time.
0 commit comments