Skip to content

Commit

Permalink
limit numeric fields to positive values
Browse files Browse the repository at this point in the history
  • Loading branch information
melkent committed Dec 6, 2024
1 parent da44242 commit 38f6aed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions frontend/src/components/Inputs/CLInputs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const CLInputWithUnits = ({
<input
className="input-with-units"
type="number"
min="0"
placeholder={placeholder}
/>
<div className="input-units">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ export const ExaminationsAndInvestigations = () => {
<Grid size={4}>
<div>
<p className="input-title">BMI</p>
<input className="manual-entry-input" type="number" placeholder="24.2 kg/m2" />
<input className="manual-entry-input" type="number" min="0" placeholder="24.2 kg/m2" />
</div>
</Grid>
<Grid size={12}>
<div>
<p className="input-title">Veins</p>
<input className="manual-entry-input" type="number" placeholder="Veins" />
<input className="manual-entry-input" type="number" min="0" placeholder="Veins" />
</div>
</Grid>
<Grid size={12}>
<div>
<p className="input-title">Allen Test</p>
<input className="manual-entry-input" type="number" placeholder="Allen Test" />
<input className="manual-entry-input" type="number" min="0" placeholder="Allen Test" />
</div>
</Grid>
<Grid size={12}>
Expand All @@ -67,7 +67,7 @@ export const ExaminationsAndInvestigations = () => {
<Grid size={6}>
<div>
<p className="input-title">EF</p>
<input className="manual-entry-input" type="number" placeholder="60%" />
<input className="manual-entry-input" type="number" min="0" placeholder="60%" />
</div>
</Grid>
<Grid size={6}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const SurgicalAndPatientInfo = () => {
<Grid size={6}>
<div>
<p className="input-title">Age</p>
<input className="manual-entry-input" type="number" placeholder="40"/>
<input className="manual-entry-input" type="number" min="0" placeholder="40"/>
</div>
</Grid>
<Grid size={6}>
Expand Down

0 comments on commit 38f6aed

Please sign in to comment.