svelte-autoresize-textarea icon indicating copy to clipboard operation
svelte-autoresize-textarea copied to clipboard

bug: Event Forwarding & attributes

Open MentalGear opened this issue 2 years ago • 2 comments

This has been really helpful so far, but what's a bit of an challenge is that events like on:keypress do not work, neither do standard attributes like maxlength.

MentalGear avatar Apr 09 '23 18:04 MentalGear

It seems like you expose those on the component, but they do not forward for some reason.

MentalGear avatar Apr 09 '23 18:04 MentalGear

Also seeing an issue with on:keypress with TypeScript:

Argument of type '(event: KeyboardEvent) => void' is not assignable to parameter of type '(e: CustomEvent<any>) => void'.
  Types of parameters 'event' and 'e' are incompatible.
    Type 'CustomEvent<any>' is missing the following properties from type 'KeyboardEvent': altKey, charCode, code, ctrlKey, and 16 more.

Not sure I'm skilled enough in TypeScript to figure out a PR on this, otherwise I would!

naquin avatar May 28 '23 02:05 naquin