aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/views/Filters.js
diff options
context:
space:
mode:
authorEmiliano Ciavatta2020-08-11 08:50:55 +0000
committerEmiliano Ciavatta2020-08-11 08:56:52 +0000
commitfe511f33c451a4c1c85950d0619b927747757d4e (patch)
tree675909b5e6d92bc62ee535eac1867513fcd276ee /frontend/src/views/Filters.js
parent9dae0115592424929ffe4045069740365bc91d52 (diff)
Fix codacy errors and warnings
Diffstat (limited to 'frontend/src/views/Filters.js')
-rw-r--r--frontend/src/views/Filters.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/frontend/src/views/Filters.js b/frontend/src/views/Filters.js
index 23d3a00..78f0342 100644
--- a/frontend/src/views/Filters.js
+++ b/frontend/src/views/Filters.js
@@ -7,8 +7,9 @@ class Filters extends Component {
constructor(props) {
super(props);
- this.state = {};
- filtersNames.forEach(elem => this.state[`${elem}_active`] = false);
+ let newState = {};
+ filtersNames.forEach(elem => newState[`${elem}_active`] = false);
+ this.state = newState;
}
componentDidMount() {
@@ -27,7 +28,7 @@ class Filters extends Component {
generateRows(filtersNames) {
return filtersNames.map(name =>
- <tr>
+ <tr key={name}>
<td><input type="checkbox"
checked={this.state[`${name}_active`]}
onChange={event => this.checkboxChangesHandler(name, event)} /></td>