mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
chore(input): forward keydown event to TextInput, PasswordInput
This commit is contained in:
parent
57406f66b3
commit
ea12dbe503
3 changed files with 17 additions and 2 deletions
|
@ -166,6 +166,7 @@
|
|||
on:input={({ target }) => {
|
||||
value = target.value;
|
||||
}}
|
||||
on:keydown
|
||||
on:focus
|
||||
on:blur />
|
||||
<button
|
||||
|
|
|
@ -22,9 +22,19 @@
|
|||
<TextInputSkeleton hideLabel />
|
||||
</div>
|
||||
{:else if story === 'password-visibility'}
|
||||
<PasswordInput {...$$props} aria-level="" />
|
||||
<PasswordInput
|
||||
{...$$props}
|
||||
aria-level=""
|
||||
on:keydown={(e) => {
|
||||
console.log('on:keydown', e);
|
||||
}} />
|
||||
{:else if story === 'controlled'}
|
||||
<PasswordInput {...$$props} {type} />
|
||||
<PasswordInput
|
||||
{...$$props}
|
||||
{type}
|
||||
on:keydown={(e) => {
|
||||
console.log('on:keydown', e);
|
||||
}} />
|
||||
<div>
|
||||
<button
|
||||
on:click={() => {
|
||||
|
@ -44,6 +54,9 @@
|
|||
bind:ref
|
||||
{...$$props}
|
||||
bind:value
|
||||
on:keydown={(e) => {
|
||||
console.log('on:keydown', e);
|
||||
}}
|
||||
on:change={() => {
|
||||
console.log('change');
|
||||
}} />
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
on:input={({ target }) => {
|
||||
value = target.value;
|
||||
}}
|
||||
on:keydown
|
||||
on:focus
|
||||
on:blur />
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue