diff options
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> |