Skip to content

Commit

Permalink
proptypes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Feb 25, 2020
1 parent ba8697c commit 25ae073
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/material-ui-lab/src/TreeView/TreeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ const TreeView = React.forwardRef(function TreeView(props, ref) {
end: getFirstNode(),
});
};

const rangeSelectToLast = (event, id) => {
if (!lastSelectedNode.current) {
lastSelectedNode.current = id;
Expand All @@ -357,6 +358,7 @@ const TreeView = React.forwardRef(function TreeView(props, ref) {
end: getLastNode(),
});
};

const selectNextNode = (event, id) =>
selectRange(
event,
Expand All @@ -366,6 +368,7 @@ const TreeView = React.forwardRef(function TreeView(props, ref) {
},
true,
);

const selectPreviousNode = (event, id) =>
selectRange(
event,
Expand All @@ -375,7 +378,9 @@ const TreeView = React.forwardRef(function TreeView(props, ref) {
},
true,
);

const selectAllNodes = event => selectRange(event, { start: getFirstNode(), end: getLastNode() });

/*
* Mapping Helpers
*/
Expand Down

0 comments on commit 25ae073

Please sign in to comment.