Check the group advance input for valid values
This commit is contained in:
parent
2defc3df22
commit
3fc8a5d291
|
|
@ -178,7 +178,14 @@ class CreateTournamentForm extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleGroupAdvanceInput(input) {
|
handleGroupAdvanceInput(input) {
|
||||||
this.setState({groupAdvance: input.target.value});
|
const newAdvance = input.target.value;
|
||||||
|
|
||||||
|
if (newAdvance === undefined || newAdvance <= 0 ||
|
||||||
|
newAdvance >= this.state.groupSize) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setState({groupAdvance: newAdvance});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleGroupPhaseEnabledInput(input) {
|
handleGroupPhaseEnabledInput(input) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue