Fix data on adding room

This commit is contained in:
britea 2020-04-17 14:30:34 +02:00
parent dc22c008d3
commit d219716526

View File

@ -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";
}