| ... |
... |
@@ -21,6 +21,10 @@ |
| 21 |
21 |
this.publicFilter = false; |
| 22 |
22 |
this.privateFilter = false; |
| 23 |
23 |
} |
|
24 |
+ toggleFilter(filterName) { |
|
25 |
+ this[filterName] = !this[filterName]; |
|
26 |
+ console.log(this.administratorFilter); |
|
27 |
+ } |
| 24 |
24 |
setSearchText(e) { |
| 25 |
25 |
this.searchText = e.target.value; |
| 26 |
26 |
} |
| ... |
... |
@@ -34,7 +34,7 @@ |
| 34 |
34 |
<input @change="${this.setSearchText}" type="text" placeholder="Search..." /> |
| 35 |
35 |
<button @click="${this.handleSearch}">Search</button> |
| 36 |
36 |
</div> |
| 37 |
|
- <label><input type="checkbox" @change="${(e) => { this.administratorFilter = e.target.checked }}" .checked="${this.administratorFilter}"/> Administrator</label> |
|
41 |
+ <label><input type="checkbox" @change="${() => this.toggleFilter('administratorFilter')}" .checked="${this.administratorFilter}"/> Administrator</label> |
| 38 |
38 |
</div> |
| 39 |
39 |
` |
| 40 |
40 |
} |