-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(material/tree): backwards compatible isExpandable
Fix backwards compatibility issue for Trees created before CdkTreeNode#isExpandable was added. Steps to reproduce. 1. Create a example tree using MatNestedTreeControl. Be sure to *not* provide an isExpandable function. 2. Add a parent and child node to example. 3. (App renders a tree with two nodes, parent has chrevron icon on it). 4. Navigate to parent node and press right arrow key on keyboard 5. (Expecting node to expand, but nothing seems to happen). Work-around: click on the node instead of using keyboard Change isExpandable logic of CdkTreeNode. Current behavior is that tree nodes are not expandable unless isExpandable is provided. With this commit applied, tree nodes that have a tree control will be expandable by default. Unless isExpandable is provided, trees using childrenAccessor or levelAccessor are not expandable, but trees using TreeControl are expandable.
- Loading branch information
Showing
4 changed files
with
36 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters