import React from 'react'; import { serviceUrl } from '../../utils/constants'; import OperationGroup from '../dirent-operation/operation-group'; class TreeDirList extends React.Component { constructor(props) { super(props); this.state = { highlight: false, isOperationShow: false, }; } onMouseEnter = () => { if (!this.props.isItemFreezed) { this.setState({ highlight: true, isOperationShow: true, }); } } onMouseOver = () => { if (!this.props.isItemFreezed) { this.setState({ highlight: true, isOperationShow: true, }); } } onMouseLeave = () => { if (!this.props.isItemFreezed) { this.setState({ highlight: false, isOperationShow: false }); } } onItemMenuShow = () => { this.props.onItemMenuShow(); } onItemMenuHide = () => { this.setState({ isOperationShow: false, highlight: '' }); this.props.onItemMenuHide(); } onMainNodeClick = () => { this.props.onMainNodeClick(this.props.node); } onDownload = () => { this.props.onDownload(this.props.node); } onDelete = () => { this.props.onDelete(this.props.node); } render() { let node = this.props.node; return (