mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
feat(number-input): forward focus, blur events to input (#1033)
This commit is contained in:
parent
222d5a90e4
commit
493568f08d
4 changed files with 11 additions and 1 deletions
|
@ -2603,6 +2603,8 @@ export type NumberInputTranslationId = "increment" | "decrement";
|
|||
| mouseenter | forwarded | -- |
|
||||
| mouseleave | forwarded | -- |
|
||||
| input | forwarded | -- |
|
||||
| focus | forwarded | -- |
|
||||
| blur | forwarded | -- |
|
||||
|
||||
## `NumberInputSkeleton`
|
||||
|
||||
|
|
|
@ -7232,7 +7232,9 @@
|
|||
{ "type": "forwarded", "name": "mouseover", "element": "div" },
|
||||
{ "type": "forwarded", "name": "mouseenter", "element": "div" },
|
||||
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
|
||||
{ "type": "forwarded", "name": "input", "element": "input" }
|
||||
{ "type": "forwarded", "name": "input", "element": "input" },
|
||||
{ "type": "forwarded", "name": "focus", "element": "input" },
|
||||
{ "type": "forwarded", "name": "blur", "element": "input" }
|
||||
],
|
||||
"typedefs": [
|
||||
{
|
||||
|
|
|
@ -215,6 +215,8 @@
|
|||
on:input="{({ target }) => {
|
||||
inputValue = target.value;
|
||||
}}"
|
||||
on:focus
|
||||
on:blur
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
|
@ -268,6 +270,8 @@
|
|||
on:input="{({ target }) => {
|
||||
inputValue = target.value;
|
||||
}}"
|
||||
on:focus
|
||||
on:blur
|
||||
/>
|
||||
{#if invalid}
|
||||
<WarningFilled16 class="bx--number__invalid" />
|
||||
|
|
2
types/NumberInput/NumberInput.svelte.d.ts
vendored
2
types/NumberInput/NumberInput.svelte.d.ts
vendored
|
@ -153,6 +153,8 @@ export default class NumberInput extends SvelteComponentTyped<
|
|||
mouseenter: WindowEventMap["mouseenter"];
|
||||
mouseleave: WindowEventMap["mouseleave"];
|
||||
input: WindowEventMap["input"];
|
||||
focus: WindowEventMap["focus"];
|
||||
blur: WindowEventMap["blur"];
|
||||
},
|
||||
{ label: {} }
|
||||
> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue