Skip to content

Commit

Permalink
Add required to all NumberInput comps to try and prevent bad inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
jayktaylor committed Dec 4, 2024
1 parent d8622b3 commit db03082
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/components/monster/MonsterContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const TombsOfAmascutMonsterContainer: React.FC<ITombsOfAmascutMonsterContainerPr
max={600}
step={5}
onChange={(v) => store.updateMonster({ inputs: { toaInvocationLevel: v } })}
required
/>
</div>
</div>
Expand All @@ -87,6 +88,7 @@ const TombsOfAmascutMonsterContainer: React.FC<ITombsOfAmascutMonsterContainerPr
max={6}
step={1}
onChange={(v) => store.updateMonster({ inputs: { toaPathLevel: v } })}
required
/>
</div>
</div>
Expand Down Expand Up @@ -170,6 +172,7 @@ const MonsterContainer: React.FC = observer(() => {
min={1}
max={20}
onChange={(s) => store.updateMonster({ speed: s })}
required
/>
</div>
</div>,
Expand All @@ -183,6 +186,7 @@ const MonsterContainer: React.FC = observer(() => {
min={1}
max={10}
onChange={(s) => store.updateMonster({ size: s })}
required
/>
</div>
</div>,
Expand Down Expand Up @@ -232,6 +236,7 @@ const MonsterContainer: React.FC = observer(() => {
max={100}
step={1}
onChange={(v) => store.updateMonster({ inputs: { partySize: v } })}
required
/>
</div>
</div>,
Expand All @@ -253,6 +258,7 @@ const MonsterContainer: React.FC = observer(() => {
max={126}
step={1}
onChange={(v) => store.updateMonster({ inputs: { partyMaxCombatLevel: v } })}
required
/>
</div>
</div>,
Expand All @@ -272,6 +278,7 @@ const MonsterContainer: React.FC = observer(() => {
max={99}
step={1}
onChange={(v) => store.updateMonster({ inputs: { partyMaxHpLevel: v } })}
required
/>
</div>
</div>,
Expand All @@ -293,6 +300,7 @@ const MonsterContainer: React.FC = observer(() => {
max={99}
step={1}
onChange={(v) => store.updateMonster({ inputs: { partyAvgMiningLevel: v } })}
required
/>
</div>
</div>,
Expand Down Expand Up @@ -333,6 +341,7 @@ const MonsterContainer: React.FC = observer(() => {
max={displayMonster.skills.hp}
step={1}
onChange={(v) => store.updateMonster({ inputs: { monsterCurrentHp: v } })}
required
/>
</div>
</div>,
Expand Down
1 change: 1 addition & 0 deletions src/app/components/monster/WeaknessBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const WeaknessBadge: React.FC<IWeaknessBadgeProps> = (props) => {
max={1000}
value={severity || 0}
step={1}
required
/>
<p>%</p>
</div>
Expand Down

0 comments on commit db03082

Please sign in to comment.