Fix data on adding room
This commit is contained in:
parent
dc22c008d3
commit
d219716526
1 changed files with 2 additions and 10 deletions
|
@ -49,19 +49,11 @@ class RoomModal extends Component {
|
|||
}
|
||||
|
||||
setInitialState() {
|
||||
for (let key in this.initialState) {
|
||||
if (this.initialState.hasOwnProperty(key)) {
|
||||
//console.log(key + " -> " + this.initialState[key]);
|
||||
this.setState({
|
||||
key: this.initialState[key],
|
||||
});
|
||||
}
|
||||
}
|
||||
console.log(this.initialState);
|
||||
//this.setState(state);
|
||||
this.setState(this.initialState);
|
||||
}
|
||||
|
||||
get type() {
|
||||
console.log(this.props.id);
|
||||
return !this.props.id ? "new" : "modify";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue