|
|
|
@ -296,32 +296,58 @@ class CodeRepositoryViewContainer extends Component {
|
|
|
|
|
render() {
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
{this.props.isOnlyContainer == true ?
|
|
|
|
|
React.Children.map(this.props.children, child => {
|
|
|
|
|
if(!child) {
|
|
|
|
|
return ''
|
|
|
|
|
}
|
|
|
|
|
return React.cloneElement(child, Object.assign({...this.state}, {
|
|
|
|
|
loadRepoFiles: this.loadRepoFiles,
|
|
|
|
|
onTreeSelect: this.onTreeSelect,
|
|
|
|
|
onLoadData: this.onLoadData,
|
|
|
|
|
}))
|
|
|
|
|
})
|
|
|
|
|
// <React.Fragment>
|
|
|
|
|
// {this.props.isOnlyContainer == true ?
|
|
|
|
|
// React.Children.map(this.props.children, child => {
|
|
|
|
|
// if(!child) {
|
|
|
|
|
// return ''
|
|
|
|
|
// }
|
|
|
|
|
// return React.cloneElement(child, Object.assign({...this.state}, {
|
|
|
|
|
// loadRepoFiles: this.loadRepoFiles,
|
|
|
|
|
// onTreeSelect: this.onTreeSelect,
|
|
|
|
|
// onLoadData: this.onLoadData,
|
|
|
|
|
// }))
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
:
|
|
|
|
|
|
|
|
|
|
<CodeRepositoryView {...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|
showFilesDrawer={this.showFilesDrawer}
|
|
|
|
|
loadRepoFiles={this.loadRepoFiles}
|
|
|
|
|
onLoadData={this.onLoadData}
|
|
|
|
|
onTreeSelect={ this.onTreeSelect }
|
|
|
|
|
onRepositoryViewExpand={this.onRepositoryViewExpand}
|
|
|
|
|
tabIndexChange={this.tabIndexChange}
|
|
|
|
|
showSettingDrawer={this.showSettingDrawer}
|
|
|
|
|
></CodeRepositoryView> }
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
// :
|
|
|
|
|
|
|
|
|
|
// <CodeRepositoryView {...this.props}
|
|
|
|
|
// {...this.state}
|
|
|
|
|
// showFilesDrawer={this.showFilesDrawer}
|
|
|
|
|
// loadRepoFiles={this.loadRepoFiles}
|
|
|
|
|
// onLoadData={this.onLoadData}
|
|
|
|
|
// onTreeSelect={ this.onTreeSelect }
|
|
|
|
|
// onRepositoryViewExpand={this.onRepositoryViewExpand}
|
|
|
|
|
// tabIndexChange={this.tabIndexChange}
|
|
|
|
|
// showSettingDrawer={this.showSettingDrawer}
|
|
|
|
|
// ></CodeRepositoryView> }
|
|
|
|
|
// </React.Fragment>
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
{this.props.isOnlyContainer == true ?
|
|
|
|
|
React.Children.map(this.props.children, child => {
|
|
|
|
|
if(!child) {
|
|
|
|
|
return ''
|
|
|
|
|
}
|
|
|
|
|
return React.cloneElement(child, Object.assign({...this.state}, {
|
|
|
|
|
loadRepoFiles: this.loadRepoFiles,
|
|
|
|
|
onTreeSelect: this.onTreeSelect,
|
|
|
|
|
onLoadData: this.onLoadData,
|
|
|
|
|
}))
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
:
|
|
|
|
|
|
|
|
|
|
<CodeRepositoryView {...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|
showFilesDrawer={this.showFilesDrawer}
|
|
|
|
|
loadRepoFiles={this.loadRepoFiles}
|
|
|
|
|
onLoadData={this.onLoadData}
|
|
|
|
|
onTreeSelect={ this.onTreeSelect }
|
|
|
|
|
onRepositoryViewExpand={this.onRepositoryViewExpand}
|
|
|
|
|
tabIndexChange={this.tabIndexChange}
|
|
|
|
|
showSettingDrawer={this.showSettingDrawer}
|
|
|
|
|
></CodeRepositoryView> }
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|