Commit 88b7f18e authored by Keith Charlene Tan Esmena's avatar Keith Charlene Tan Esmena
Browse files

Fixed names (#5)

parent ce8e55dd
......@@ -17,18 +17,20 @@ class IssueView extends React.Component<any, any> {
}
handleChange(event: any) {
this.setState({ value: event.target.value });
this.setState({ issueFilter: event.target.value });
localStorage.setItem("issueFilter", event.target.value);
}
render() {
console.log("start: " + this.state.issueFilter);
let savedFilter = String(localStorage.getItem("issueFilter"));
return (
<>
<h3>Issues</h3>
<label>Filter issues: </label>
<select value={savedFilter} onChange={this.handleChange} id="issues">
<select
value={this.state.issueFilter}
onChange={this.handleChange}
id="issues"
>
<option value="All">All</option>
<option value="To do">To do</option>
<option value="Doing">Doing</option>
......@@ -36,7 +38,7 @@ class IssueView extends React.Component<any, any> {
</select>
<div id="issueBox">
{/* Må ha dette hvis Issue skal inni en IssueBox i App: {this.props.children} */}
<Issue value={savedFilter} />
<Issue value={this.state.issueFilter} />
</div>
</>
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment