Skip to content

Commit

Permalink
BZ-22453: feat: Add OnFocusOut event in InputButton component
Browse files Browse the repository at this point in the history
- added onFocusOut event for InputButton
- implemented the same function as present for Input
  • Loading branch information
Priyanshu-p-juspay authored and sinha-sahil committed Jun 3, 2024
1 parent 744c9b9 commit cf774ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/InputButton/InputButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
}
dispatch('stateChange', event);
}
function onFocusOut(event: CustomEvent) {
dispatch('focusout', event);
}
</script>

{#if properties.inputProperties.label && properties.inputProperties.label !== ''}
Expand All @@ -69,6 +73,7 @@
on:keyup={triggerRightClickIfValid}
on:stateChange={handleState}
on:input={(event) => dispatch('input', event)}
on:focusout={onFocusOut}
on:focus
--input-width="auto"
/>
Expand Down Expand Up @@ -106,6 +111,7 @@
--button-width: 100%;
--input-border: none;
--input-focus-border: none;
border: var(--input-button-container-border);
}
.input-button {
Expand Down

0 comments on commit cf774ef

Please sign in to comment.