Added keyboard event
This commit is contained in:
parent
2aaf87b8d3
commit
3bbf9ccd8a
1 changed files with 2 additions and 1 deletions
|
|
@ -6,12 +6,13 @@ interface Props {
|
|||
label?: string
|
||||
value: string
|
||||
onChange: Setter<string>
|
||||
onKeyDown?: (event: KeyboardEvent) => void
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
return (
|
||||
<>
|
||||
<TextField class="text-field" value={props.value} onChange={props.onChange}>
|
||||
<TextField class="text-field" value={props.value} onChange={props.onChange} onKeyDown={props.onKeyDown}>
|
||||
<Show when={props.label}>
|
||||
<TextField.Label class="text-field__label">{props.label}</TextField.Label>
|
||||
</Show>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue