File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1515 }
1616 @if (Template != null )
1717 {
18- <div class =@LabelClass @onkeydown:stopPropagation >@Template(this) </div >
18+ <div class =@LabelClass @onkeydown:stopPropagation @onclick = " @OnTemplateClick " >@Template(this) </div >
1919 } else
2020 {
2121 <label for =" @(GetHashCode())" class =@LabelClass >@Text </label >
Original file line number Diff line number Diff line change @@ -487,5 +487,14 @@ await Tree.ItemContextMenu.InvokeAsync(new TreeItemContextMenuEventArgs()
487487 ShiftKey = args . ShiftKey
488488 } ) ;
489489 }
490+
491+ internal async Task OnTemplateClick ( MouseEventArgs args )
492+ {
493+ if ( Tree != null && Tree . AllowCheckBoxes && Checkable )
494+ {
495+ var currentValue = IsChecked ( ) ;
496+ await CheckedChange ( currentValue == true ? false : true ) ;
497+ }
498+ }
490499 }
491500}
You can’t perform that action at this time.
0 commit comments