Skip to content

Commit

Permalink
Input update
Browse files Browse the repository at this point in the history
  • Loading branch information
barvian committed Oct 28, 2024
1 parent 104c6e8 commit 016e1dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function Input({ value = 0, min = -Infinity, max = Infinity, onCh
const num = parseInt(el.value)
if (!isNaN(num) && min <= num && num <= max) next = num
}
// Manually update the input.value in case the number stays the same i.e. 09 == 9
// Manually update the input.value in case the number stays the same e.g. 09 == 9
el.value = String(next)
onChange?.(next)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
const num = parseInt(input.value)
if (!isNaN(num) && min <= num && num <= max) next = num
}
// Manually update the input.value in case the number stays the same i.e. 09 == 9
// Manually update the input.value in case the number stays the same e.g. 09 == 9
input.value = String(next)
value = next
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function handleInput({ currentTarget }: Event) {
const num = parseInt(input.value)
if (!isNaN(num) && min <= num && num <= max) next = num
}
// Manually update the input.value in case the number stays the same i.e. 09 == 9
// Manually update the input.value in case the number stays the same e.g. 09 == 9
input.value = String(next)
modelValue.value = next
}
Expand Down

0 comments on commit 016e1dd

Please sign in to comment.