Commit f3d0576d authored by Laura Fuentes Grau's avatar Laura Fuentes Grau

HTML content: pressing enter doesn't reload page anymore, Orientation: type can now be changed

parent 9f6ee377
......@@ -68,7 +68,7 @@ class EditWidgetHTMLContent extends React.Component {
return (
<FormGroup controlId={this.props.controlId}>
<FormLabel>HTML Content</FormLabel>
<FormControl type="text" onKeyPress={this.handleKeyIgnore} componentclass="textarea" style={{ height: 200 }} placeholder={this.props.placeholder} value={this.state.value} onChange={e => this.props.handleChange(e)} />
<FormControl onKeyDown={this.handleKeyIgnore} componentclass="textarea" style={{ height: 200 }} placeholder={this.props.placeholder} value={this.state.value} onChange={e => this.props.handleChange(e)} />
<FormControl.Feedback />
</FormGroup>
);
......
......@@ -38,7 +38,9 @@ class EditWidgetOrientation extends Component {
}
handleOrientationChange(orientation) {
this.props.handleChange({ target: { id: 'orientation', value: orientation } });
console.log("handle OrinetationChange was called. the orientation: " + orientation);
this.props.handleChange({ target: { id: 'customProperties.orientation', value: orientation } });
}
render() {
......@@ -55,6 +57,7 @@ class EditWidgetOrientation extends Component {
Object.keys(WidgetSlider.OrientationTypes).map( (type) => {
let value = WidgetSlider.OrientationTypes[type].value;
let name = WidgetSlider.OrientationTypes[type].name;
console.log("value: " + value + " name: " + name)
return (
<FormCheck inline label={name} key={value} id={value} type='radio' title='orientation' checked={ value === this.state.widget.customProperties.orientation } onChange={(e) => this.handleOrientationChange(value)}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment