Room remove image button fixed
This commit is contained in:
parent
0c98ed0e49
commit
6454a369df
2 changed files with 1450 additions and 953 deletions
|
@ -26,7 +26,7 @@ class RoomModal extends Component {
|
||||||
|
|
||||||
this.addRoomModal = this.addRoomModal.bind(this);
|
this.addRoomModal = this.addRoomModal.bind(this);
|
||||||
this.updateIcon = this.updateIcon.bind(this);
|
this.updateIcon = this.updateIcon.bind(this);
|
||||||
this.removeImage = this.removeImage.bind(this);
|
this.unsetImage = this.unsetImage.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
get initialState() {
|
get initialState() {
|
||||||
|
@ -38,13 +38,9 @@ class RoomModal extends Component {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
removeImage(e) {
|
unsetImage = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.setState(
|
this.setState({ ...this.state, img: "" });
|
||||||
update(this.state, {
|
|
||||||
image: { $set: null },
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setInitialState() {
|
setInitialState() {
|
||||||
|
|
2393
smart-hut/yarn.lock
2393
smart-hut/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue