如何在每个节点上提供工具提示react-sortable-tree

时间:2019-07-03 13:28:47

标签: reactjs treeview

如何使用react-sortable-tree在每个节点上添加工具提示?

这是我的代码。我是SortableTree。

<SortableTree                                
 treeData={treeData1}                                    
   generateNodeProps={({ node, path }) => {                                                                      
   buttons: [                                                    
   <i className="fa fa-trash action-list"                                    
      title="Delete" aria-hidden="true"                                  
       onClick={() => {                                              
     if(window.confirm('Are you sure you want to delete this?')) {                           
       this.state.ondrag = false;                                                    
      this.state.ondelete = true;                                                
        this.deleteTreeNode(productId)                                   
    }}}></i>                                                 
   ],                                            
 };                                          
}}/>
---------------------------------------------------------------
  How to add tooltip here?

0 个答案:

没有答案