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() {
|
setInitialState() {
|
||||||
for (let key in this.initialState) {
|
this.setState(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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get type() {
|
get type() {
|
||||||
|
console.log(this.props.id);
|
||||||
return !this.props.id ? "new" : "modify";
|
return !this.props.id ? "new" : "modify";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue