Remove upper bounds for numeric inputs
This commit is contained in:
parent
71d66fdb74
commit
5b64dc6c0e
|
|
@ -153,12 +153,10 @@ class CreateTournamentForm extends React.Component {
|
|||
increaseGroupAdvance() {
|
||||
const newGroupAdvance = this.state.groupAdvance * 2;
|
||||
|
||||
if (newGroupAdvance <= this.state.groupSize) {
|
||||
this.setState({
|
||||
groupAdvance: newGroupAdvance
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
decreaseGroupAdvance() {
|
||||
const newGroupAdvance = Math.floor(this.state.groupAdvance / 2);
|
||||
|
|
@ -178,14 +176,7 @@ class CreateTournamentForm extends React.Component {
|
|||
const newGroupSize = this.state.groupSize - 1;
|
||||
|
||||
if (newGroupSize >= 3) {
|
||||
if (newGroupSize >= this.state.groupAdvance) {
|
||||
this.setState({groupSize: newGroupSize});
|
||||
} else {
|
||||
this.setState({
|
||||
groupSize: newGroupSize,
|
||||
groupAdvance: Math.floor(this.state.groupAdvance / 2)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue