From 3b55a8ea78c5f088633c0893dd5135607ac9dc3a Mon Sep 17 00:00:00 2001 From: "Claudio Maggioni (maggicl)" Date: Wed, 6 May 2020 11:28:27 +0200 Subject: [PATCH] Fixed style issues on scene share guest button --- smart-hut/src/components/SceneModal.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/smart-hut/src/components/SceneModal.js b/smart-hut/src/components/SceneModal.js index 513c2e6..8b935cc 100644 --- a/smart-hut/src/components/SceneModal.js +++ b/smart-hut/src/components/SceneModal.js @@ -9,6 +9,7 @@ import { Input, Dropdown, Checkbox, + Segment, } from "semantic-ui-react"; import SelectIcons from "./SelectIcons"; import { connect } from "react-redux"; @@ -110,15 +111,15 @@ class SceneModal extends Component { }; closeModal = (e) => { - this.setState({ openModal: false }); + this.setState({ ...this.state, openModal: false }); }; openModal = (e) => { - this.setState({ openModal: true }); + this.setState({ ...this.state, openModal: true }); }; updateIcon(e) { - this.setState({ selectedIcon: e }); + this.setState({ ...this.state, selectedIcon: e }); } setCopyFrom(_, copyFrom) { @@ -127,7 +128,7 @@ class SceneModal extends Component { setGuestAccessEnabled(val) { console.log(this.state, val); - this.setState({ guestAccessEnabled: val }); + this.setState({ ...this.state, guestAccessEnabled: val }); } render() { @@ -223,13 +224,16 @@ class SceneModal extends Component { )} {this.type === "modify" ? ( + this.setGuestAccessEnabled(val.checked) } /> + ) : null}