Skip to content
This repository has been archived by the owner on May 25, 2020. It is now read-only.

Commit

Permalink
Add min and max values to number of colums per view
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Moerman committed May 15, 2018
1 parent 957eb66 commit edc16b5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ const DefaultNumberOfBranchesPerTile = (props: { view: View }) => {
name="view-branches-per-tile-input"
className="form-control"
value={props.view.defaultNumberOfBranchesPerTile}
step={1}
min={1}
onClick={stopPropagation}
onChange={(event: ChangeEvent<HTMLInputElement>) => updateView(props.view.withDefaultNumberOfBranchesPerTile(+event.currentTarget.value))}
onKeyUp={onEnter(() => saveView(props.view))}/>;
Expand All @@ -105,6 +107,9 @@ const DefaultNumberOfBranchesPerTile = (props: { view: View }) => {
const NumberOfColumns = (props: { view: View }) => {
if (props.view.isEditing)
return <input type="number"
step={1}
min={4}
max={16}
name="view-number-of-columns"
className="form-control"
value={props.view.numberOfColumns}
Expand Down

0 comments on commit edc16b5

Please sign in to comment.