mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +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 }) => {
|
on:input={({ target }) => {
|
||||||
value = target.value;
|
value = target.value;
|
||||||
}}
|
}}
|
||||||
|
on:keydown
|
||||||
on:focus
|
on:focus
|
||||||
on:blur />
|
on:blur />
|
||||||
<button
|
<button
|
||||||
|
|
|
@ -22,9 +22,19 @@
|
||||||
<TextInputSkeleton hideLabel />
|
<TextInputSkeleton hideLabel />
|
||||||
</div>
|
</div>
|
||||||
{:else if story === 'password-visibility'}
|
{: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'}
|
{:else if story === 'controlled'}
|
||||||
<PasswordInput {...$$props} {type} />
|
<PasswordInput
|
||||||
|
{...$$props}
|
||||||
|
{type}
|
||||||
|
on:keydown={(e) => {
|
||||||
|
console.log('on:keydown', e);
|
||||||
|
}} />
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
|
@ -44,6 +54,9 @@
|
||||||
bind:ref
|
bind:ref
|
||||||
{...$$props}
|
{...$$props}
|
||||||
bind:value
|
bind:value
|
||||||
|
on:keydown={(e) => {
|
||||||
|
console.log('on:keydown', e);
|
||||||
|
}}
|
||||||
on:change={() => {
|
on:change={() => {
|
||||||
console.log('change');
|
console.log('change');
|
||||||
}} />
|
}} />
|
||||||
|
|
|
@ -138,6 +138,7 @@
|
||||||
on:input={({ target }) => {
|
on:input={({ target }) => {
|
||||||
value = target.value;
|
value = target.value;
|
||||||
}}
|
}}
|
||||||
|
on:keydown
|
||||||
on:focus
|
on:focus
|
||||||
on:blur />
|
on:blur />
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue