Skip to content

Commit

Permalink
fix(docs): selecting with keyboard (#UIM-873) (#818)
Browse files Browse the repository at this point in the history
  • Loading branch information
lskramarov authored Feb 18, 2022
1 parent 350c5f7 commit 94c38ce
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,25 @@
[dataSource]="dataSource"
[treeControl]="treeControl">

<mc-tree-option *mcTreeNodeDef="let node" mcTreeNodePadding [disabled]="node.name === 'tests'">
<mc-tree-option
*mcTreeNodeDef="let node"
mcTreeNodePadding
[disabled]="node.name === 'tests'"
(keydown.enter)="fileSelectionToggle(node)"
(keydown.space)="fileSelectionToggle(node)">

<mc-checkbox class= "tree-example-checkbox" [disabled]="node.name === 'tests'"
[checked]="checklistSelection.isSelected(node)"
(change)="fileSelectionToggle(node)"></mc-checkbox>
<span [innerHTML]="treeControl.getViewValue(node)"></span>
</mc-tree-option>

<mc-tree-option *mcTreeNodeDef="let node; when: hasChild" mcTreeNodePadding>
<mc-tree-option
*mcTreeNodeDef="let node; when: hasChild"
mcTreeNodePadding
(keydown.enter)="fileSelectionToggle(node)"
(keydown.space)="fileSelectionToggle(node)">

<mc-tree-node-toggle [node]="node"></mc-tree-node-toggle>
<mc-checkbox class= "tree-example-checkbox"
[checked]="descendantsAllSelected(node)"
Expand Down

0 comments on commit 94c38ce

Please sign in to comment.