Allow pasting thousands-separated values into input

This commit is contained in:
Victor Oliva
2026-03-16 09:13:13 +01:00
parent 473eb011c8
commit f4cd74b45a

View File

@@ -75,7 +75,8 @@ export const IntegerInput: FC<{
const handleChange = useCallback(
(e: React.ChangeEvent<HTMLInputElement>) => {
const input = e.target.value
// Exclude thousands separators when pasting
const input = e.target.value.replace(/[,. ']/g, "")
// Allow empty input
if (input === "") {