1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 18:03:48 +00:00

Add related documents UI (#2577)

This commit is contained in:
王健辉
2018-12-28 14:25:25 +08:00
committed by Daniel Pan
parent 8637abde8d
commit dd15cd0ea8
12 changed files with 436 additions and 12 deletions

View File

@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import DirentListView from './dirent-list-view';
const propTypes = {
isShowFile: PropTypes.bool,
selectedPath: PropTypes.string,
selectedRepo: PropTypes.object,
repo: PropTypes.object.isRequired,
@@ -24,9 +25,9 @@ class RepoListItem extends React.Component {
this.setState({isShowChildren: !this.state.isShowChildren});
}
onDirentItemClick = (filePath) => {
onDirentItemClick = (filePath, dirent) => {
let repo = this.props.repo;
this.props.onDirentItemClick(repo, filePath);
this.props.onDirentItemClick(repo, filePath, dirent);
}
onRepoItemClick = () => {
@@ -52,6 +53,7 @@ class RepoListItem extends React.Component {
isShowChildren={this.state.isShowChildren}
onDirentItemClick={this.onDirentItemClick}
selectedPath={this.props.selectedPath}
isShowFile={this.props.isShowFile}
/>
)}
</li>