diff options
author | Emiliano Ciavatta | 2020-09-29 16:56:00 +0000 |
---|---|---|
committer | Emiliano Ciavatta | 2020-09-29 16:56:00 +0000 |
commit | d994a21a0dfae9ee026e8aa3ccdee6c213c523aa (patch) | |
tree | a9d343300d3b9587bdaa664ef9f005ddc9529656 /frontend/src/components/filters | |
parent | 7f4cc5d3f3f92338a464853c182b9d6a3ea850eb (diff) |
Complete rules page
Diffstat (limited to 'frontend/src/components/filters')
-rw-r--r-- | frontend/src/components/filters/RulesConnectionsFilter.js | 2 | ||||
-rw-r--r-- | frontend/src/components/filters/StringConnectionsFilter.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/frontend/src/components/filters/RulesConnectionsFilter.js b/frontend/src/components/filters/RulesConnectionsFilter.js index 0741bea..f4d0b1c 100644 --- a/frontend/src/components/filters/RulesConnectionsFilter.js +++ b/frontend/src/components/filters/RulesConnectionsFilter.js @@ -25,7 +25,7 @@ class RulesConnectionsFilter extends Component { let activeRules = params.getAll("matched_rules") || []; backend.getJson("/api/rules").then(res => { - let rules = res.flatMap(rule => rule.enabled ? [{id: rule.id, name: rule.name}] : []); + let rules = res.json.flatMap(rule => rule.enabled ? [{id: rule.id, name: rule.name}] : []); activeRules = rules.filter(rule => activeRules.some(id => rule.id === id)); this.setState({rules, activeRules, mounted: true}); }); diff --git a/frontend/src/components/filters/StringConnectionsFilter.js b/frontend/src/components/filters/StringConnectionsFilter.js index a304198..f463593 100644 --- a/frontend/src/components/filters/StringConnectionsFilter.js +++ b/frontend/src/components/filters/StringConnectionsFilter.js @@ -115,7 +115,7 @@ class StringConnectionsFilter extends Component { return ( <div className="filter" style={{"width": `${this.props.width}px`}}> <InputField active={active} invalid={this.state.invalidValue} name={this.props.filterName} - defaultValue={this.props.defaultFilterValue} onChange={this.filterChanged} + placeholder={this.props.defaultFilterValue} onChange={this.filterChanged} value={this.state.fieldValue} inline={true} small={true} /> {redirect} </div> |