|
|
@ -68,12 +68,13 @@ export default function Input({label, prefix, numDecimals, error, hint, name, va
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const filledText = ((prefix + ' ') || '')
|
|
|
|
const filledText = ((prefix + ' ') || '')
|
|
|
|
+ (Math.floor(currentValue) || '0')
|
|
|
|
+ (currentValue !== 0 ? Math.floor(currentValue) : '')
|
|
|
|
+ (currentDecimals >= 0 ? '.' : '')
|
|
|
|
+ (currentDecimals >= 0 ? '.' : '')
|
|
|
|
+ (currentDecimals > 0 ? currentValue.toFixed(currentDecimals).split('.')[1] : '')
|
|
|
|
+ (currentDecimals > 0 ? currentValue.toFixed(currentDecimals).split('.')[1] : '')
|
|
|
|
|
|
|
|
|
|
|
|
const remainingText =
|
|
|
|
const remainingText =
|
|
|
|
(currentDecimals < 0 ? '.' : '')
|
|
|
|
(currentValue === 0 ? '0' : '')
|
|
|
|
|
|
|
|
+ (currentDecimals < 0 ? '.' : '')
|
|
|
|
+ (numDecimals !== undefined && currentDecimals < numDecimals ? '0'.repeat(numDecimals - Math.max(currentDecimals, 0)) : '')
|
|
|
|
+ (numDecimals !== undefined && currentDecimals < numDecimals ? '0'.repeat(numDecimals - Math.max(currentDecimals, 0)) : '')
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|