Merge branch '97-if-i-create-a-new-room-with-an-image-remove-image-does-not-work' into 'dev'
Resolve "If I create a new room with an image - remove image does not work" Closes #97 See merge request sa4-2020/the-sanmarinoes/frontend!121
This commit is contained in:
commit
b26162415c
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