Merge branch 'scene-fix' into 'dev'

Fixed style issues on scene share guest button

See merge request sa4-2020/the-sanmarinoes/frontend!126
This commit is contained in:
Claudio Maggioni 2020-05-06 11:32:07 +02:00
commit 3dcd24f36d

View file

@ -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" ? (
<Form.Field>
<Segment compact style={{ marginBottom: "1rem"}}>
<Checkbox
label="Enable guest access"
checked={this.state.guestAccessEnabled}
toggle
onChange={(e, val) =>
this.setGuestAccessEnabled(val.checked)
}
/>
</Segment>
</Form.Field>
) : null}
</Form>