fix warnings in tutorial builder
This commit is contained in:
@@ -108,7 +108,7 @@ class BlocklyExample extends Component {
|
||||
}
|
||||
catch(err){
|
||||
initialXml = null;
|
||||
this.props.setError(this.props.index, 'xml');
|
||||
// this.props.setError(this.props.index, 'xml');
|
||||
}
|
||||
return (
|
||||
<div style={{marginTop: '10px'}}>
|
||||
|
||||
@@ -134,7 +134,7 @@ class Builder extends Component {
|
||||
<Textfield value={this.props.title} property={'title'} label={'Titel'} error={this.props.error.title}/>
|
||||
|
||||
{this.props.steps.map((step, i) =>
|
||||
<Step step={step} index={i} />
|
||||
<Step step={step} index={i} key={i}/>
|
||||
)}
|
||||
|
||||
{/*submit or reset*/}
|
||||
|
||||
@@ -36,7 +36,7 @@ class Id extends Component {
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.props.tutorialId(value);
|
||||
this.props.tutorialId(value.toString());
|
||||
this.props.setError(undefined,'id');
|
||||
}
|
||||
};
|
||||
@@ -81,7 +81,7 @@ class Id extends Component {
|
||||
endAdornment={
|
||||
<div style={{display: 'flex'}}>
|
||||
<Button
|
||||
disabled={this.props.value === 1 || !this.props.value}
|
||||
disabled={this.props.value === 1 || !Number.isInteger(this.props.value)}
|
||||
onClick={() => this.handleCounter(-1)}
|
||||
variant='contained'
|
||||
color='primary'
|
||||
|
||||
Reference in New Issue
Block a user