МТ
Size: a a a
МТ
МТ
YK
YK
YK
МТ
МТ
АН
МТ
КС
function handleInput(e: KeyboardEvent) {
if (e.key === 'Enter') {
dispatch('enter');
return;
}
}
Error: Type '(e: KeyboardEvent) => void' is not assignable to type 'EventHandler<Event, HTMLInputElement>'.
Types of parameters 'e' and 'event' are incompatible.
Type 'Event & { currentTarget: EventTarget & HTMLInputElement; }' is missing the following properties from type 'KeyboardEvent': altKey, char, charCode, code, and 16 more. (ts)
on:keyup={handleInput}
on:change={handleInput}
bind:value={p.quantity}
S
const handleInput: EventHandler<KeyboardEvent, HTMLInputElement>(e) => {
if (e.key === 'Enter') {
dispatch('enter');
return;
}
}
S
KeyboardEvent
может просто event хзКС
key
:(КС
type="number"
не могут работать на биндах с 'number' | 'null'
типамиКС
AP
КС
i
IF
TG