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() { 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";
} }