New source found from dndbeyond.com

This commit is contained in:
2025-06-25 01:00:21 -07:00
parent 0b403376c5
commit 2c657770de
6 changed files with 25 additions and 10 deletions
@@ -79,12 +79,20 @@ export const InputField: FC<InputFieldProps> = ({
const intValue = parseInt(e.target.value);
// If entered value is below the minimum, reset to minimum
if (!isNaN(intValue) && inputProps?.min && intValue < inputProps?.min) {
if (
!isNaN(intValue) &&
inputProps?.min !== undefined &&
intValue < inputProps.min
) {
setValue(inputProps.min);
}
// If entered value is above the maximum and no initialValue exists, reset to maximum
if (!isNaN(intValue) && inputProps?.max && intValue > inputProps?.max) {
if (
!isNaN(intValue) &&
inputProps?.max !== undefined &&
intValue > inputProps.max
) {
setValue(inputProps.max);
}