shoelace-style/webawesome

Typescript types for <WaFileInput> missing form associated properties

Open

#2.540 geöffnet am 23. Juni 2026

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (157 Forks)github user discovery
WA Probughelp wanted

Repository-Metriken

Stars
 (1.104 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Describe the bug

When using the Pro component with ReactJS in a Typescript project, using the name property causes a Typescript error.

To Reproduce

Steps to reproduce the behavior:

  1. Create a new React project npx create-react-app my-react-project --template typescript
  2. Add WebAwesome 3.9.0 to your project npm add @awesome.me/webawesome-pro@3.9.0 (bring your own Webawesome Pro token)
  3. In your React project, create a <form> and add a <WaFileInput> component to it
  4. Add a name property to your <WaFileInput> (e.g. <WaFileInput name="foobar" />)
  5. Run the Typescript compiler on your project npm exec tsc

Result: Compilation fails with the following error

Type '{ name: string; }' is not assignable to type 'IntrinsicAttributes & Omit<HTMLAttributes<WaFileInput>, "onWaInvalid" | "assumeInteractionOn" | "input" | "size" | "handleSizeChange" | ... 15 more ... | "fileCount"> & EventListeners<...> & Partial<...> & RefAttributes<...>'.
  Property 'name' does not exist on type 'IntrinsicAttributes & Omit<HTMLAttributes<WaFileInput>, "onWaInvalid" | "assumeInteractionOn" | "input" | "size" | "handleSizeChange" | ... 15 more ... | "fileCount"> & EventListeners<...> & Partial<...> & RefAttributes<...>'.

Demo

I created a demo repo in the error state: https://github.com/fmercille/wa-file-input-name

  1. git clone https://github.com/fmercille/wa-file-input-name.git
  2. cd wa-file-input-name
  3. export WEBAWESOME_NPM_TOKEN=<YOUR_TOKEN>
  4. npm install
  5. npm exec tsc

Screenshots

Other pro components accept the name property as expected. Only <WaFileInput> seems impacted

Contributor Guide