Skip to content

Commit

Permalink
fix: allowing onblur prop in bytes component
Browse files Browse the repository at this point in the history
  • Loading branch information
dafuga committed Oct 5, 2024
1 parent ddb93e3 commit feb14f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/components/input/bytes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
value = $bindable(),
valid = $bindable(),
oninput,
onblur,
...props
}: BytesInputProps = $props();
Expand Down Expand Up @@ -85,8 +86,9 @@
unit = units[(currentIndex + 1) % units.length];
}
function handleBlur() {
function handleBlur(event: FocusEvent & { currentTarget: EventTarget & HTMLInputElement }) {
isAddingDecimal = false;
onblur?.(event);
}
if (debug) {
Expand Down

0 comments on commit feb14f5

Please sign in to comment.