diff --git a/src/plugins/sections/Tree.js b/src/plugins/sections/Tree.js index 4a6a06976..45576b68c 100644 --- a/src/plugins/sections/Tree.js +++ b/src/plugins/sections/Tree.js @@ -62,11 +62,13 @@ type TreeData = Array<{ removed?: boolean, updated?: boolean, unchanged?: boolean, + isSection?: boolean, + isDataModel?: boolean, }>; type Props = { data: TreeData | SectionComponentHierarchy, - nodeClickHandler?: (node, evt) => void, + nodeClickHandler?: (node: any, evt: InputEvent) => void, }; type State = { diff --git a/src/plugins/sections/index.js b/src/plugins/sections/index.js index 67cee8754..97bb78c4d 100644 --- a/src/plugins/sections/index.js +++ b/src/plugins/sections/index.js @@ -170,7 +170,7 @@ export default class extends FlipperPlugin { }); }; - onNodeClicked = (targetNode, evt) => { + onNodeClicked = (targetNode: any, evt: InputEvent) => { if (targetNode.attributes.isSection) { this.setState({ selectedTreeNode: null, @@ -179,7 +179,6 @@ export default class extends FlipperPlugin { } let dataModel; - const selectedTreeNode = {}; // Not all models can be parsed. if (targetNode.attributes.isDataModel) { try {