fix props

This commit is contained in:
casperlamboo 2017-11-16 15:05:28 +01:00
parent 5f1a7e3e74
commit e33c967934

View File

@ -26,12 +26,14 @@ class Settings extends React.Component {
defaultMaterial: PropTypes.string.isRequired, defaultMaterial: PropTypes.string.isRequired,
initialSettings: PropTypes.object.isRequired initialSettings: PropTypes.object.isRequired
}; };
state = { constructor(props) {
settings: props.initialSettings, this.state = {
printers: props.defaultPrinter, settings: props.initialSettings,
quality: props.defaultQuality, printers: props.defaultPrinter,
material: props.defaultMaterial quality: props.defaultQuality,
}; material: props.defaultMaterial
};
}
changeSettings = (fieldName, value) => { changeSettings = (fieldName, value) => {
const { onChange } = this.props; const { onChange } = this.props;