Fix clearing log focus
This commit is contained in:
parent
32b60fa0ff
commit
c3dbf9685d
1 changed files with 10 additions and 8 deletions
|
@ -33,7 +33,7 @@ class Dashboard extends Component {
|
|||
plugins: {},
|
||||
sidebarOpen: false,
|
||||
modalOpen: false,
|
||||
logFocus: "",
|
||||
logFocus: null,
|
||||
}
|
||||
this.logLines = []
|
||||
this.logMap = {}
|
||||
|
@ -126,16 +126,18 @@ class Dashboard extends Component {
|
|||
entry,
|
||||
onDelete: () => this.delete(field, id),
|
||||
onChange: newEntry => this.add(field, newEntry, id),
|
||||
openLog: filter => {
|
||||
this.setState({
|
||||
logFocus: filter,
|
||||
})
|
||||
this.logModal.open()
|
||||
},
|
||||
openLog: this.openLog,
|
||||
ctx: this.state,
|
||||
})
|
||||
}
|
||||
|
||||
openLog = filter => {
|
||||
this.setState({
|
||||
logFocus: typeof filter === "string" ? filter : null,
|
||||
})
|
||||
this.logModal.open()
|
||||
}
|
||||
|
||||
renderNotFound = (thing = "path") => (
|
||||
<div className="not-found">
|
||||
Oops! I'm afraid that {thing} couldn't be found.
|
||||
|
@ -185,7 +187,7 @@ class Dashboard extends Component {
|
|||
|
||||
<main className="view">
|
||||
<Switch>
|
||||
<Route path="/" exact render={() => <Home openLog={this.logModal.open}/>}/>
|
||||
<Route path="/" exact render={() => <Home openLog={this.openLog}/>}/>
|
||||
<Route path="/new/instance" render={() =>
|
||||
<Instance onChange={newEntry => this.add("instances", newEntry)}
|
||||
ctx={this.state}/>}/>
|
||||
|
|
Loading…
Reference in a new issue