File tree 1 file changed +17
-12
lines changed
1 file changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -445,23 +445,26 @@ private async void OnCheckBoxClick(MouseEventArgs args)
445
445
/// <param name="check"></param>
446
446
public void SetChecked ( bool check )
447
447
{
448
- if ( ! Disabled )
448
+ if ( Disabled )
449
449
{
450
- if ( TreeComponent . CheckStrictly )
451
- {
452
- this . Checked = check ;
453
- }
454
- else
455
- {
456
- SetChildChecked ( this , check ) ;
457
- if ( ParentNode != null )
458
- ParentNode . UpdateCheckState ( ) ;
459
- }
450
+ return ;
451
+ }
452
+
453
+ if ( TreeComponent . CheckStrictly )
454
+ {
455
+ this . Checked = check ;
460
456
}
461
457
else
462
- TreeComponent . AddOrRemoveCheckNode ( this ) ;
458
+ {
459
+ SetChildChecked ( this , check ) ;
460
+ if ( ParentNode != null )
461
+ ParentNode . UpdateCheckState ( ) ;
462
+ }
463
+
464
+ TreeComponent . AddOrRemoveCheckNode ( this ) ;
463
465
StateHasChanged ( ) ;
464
466
}
467
+
465
468
/// <summary>
466
469
/// Set the checkbox state when ini
467
470
/// </summary>
@@ -496,6 +499,7 @@ private void SetChildChecked(TreeNode<TItem> subnode, bool check)
496
499
foreach ( var child in subnode . ChildNodes )
497
500
child ? . SetChildChecked ( child , check ) ;
498
501
}
502
+
499
503
/// <summary>
500
504
/// Sets the checkbox status of child nodes whern bind default
501
505
/// </summary>
@@ -574,6 +578,7 @@ private void UpdateCheckState(bool? halfChecked = null)
574
578
if ( ParentNode == null )
575
579
StateHasChanged ( ) ;
576
580
}
581
+
577
582
/// <summary>
578
583
/// Update check status when bind default
579
584
/// </summary>
You can’t perform that action at this time.
0 commit comments