Custom button for expand/collapse node in Tree
Summary: When clicking a node in the tree, currently it expands or collapses the subtree under it. This adds a chevron button which only handles the expansion functionality, and clicking on the label with the Section name will show info about that Section in the side panel. Reviewed By: fabiomassimo Differential Revision: D17165150 fbshipit-source-id: ac6b6c127b68274f53523b3ea62422ff96116e9b
This commit is contained in:
committed by
Facebook Github Bot
parent
4f181cc2ea
commit
d77b5f0062
@@ -172,8 +172,10 @@ export default class extends FlipperPlugin<State, *, PersistedState> {
|
||||
|
||||
onNodeClicked = (targetNode: any, evt: InputEvent) => {
|
||||
if (targetNode.attributes.isSection) {
|
||||
const sectionData = {};
|
||||
sectionData['global_key'] = targetNode.attributes.identifier;
|
||||
this.setState({
|
||||
selectedTreeNode: null,
|
||||
selectedTreeNode: {sectionData},
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user