1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-11 11:51:27 +00:00

wiki search (#2278)

This commit is contained in:
shanshuirenjia
2018-08-17 12:23:55 +08:00
committed by Daniel Pan
parent c24d527a03
commit 0105e8e8ef
8 changed files with 350 additions and 25 deletions

View File

@@ -50,8 +50,7 @@ class MarkdownViewer extends React.Component {
html: '',
outlineTreeRoot: null,
navItems: [],
activeId: 0,
isLoading: true
activeId: 0
}
scrollToNode(node) {
@@ -117,15 +116,9 @@ class MarkdownViewer extends React.Component {
var currentId = navItems.length > 0 ? navItems[0].id : 0;
_this.setState({
navItems: navItems,
activeId: currentId,
isLoading: false
})
} else {
_this.setState({
isLoading: false
activeId: currentId
})
}
});
}
@@ -151,7 +144,7 @@ class MarkdownViewer extends React.Component {
}
render() {
if (this.state.isLoading) {
if (this.props.isFileLoading) {
return (
<span className="loading-icon loading-tip"></span>
)