Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoComplete: event type in onInput prop is FormEvent<HtmlSpanElement> #6145

Closed
datacampsis opened this issue Mar 13, 2024 · 0 comments · Fixed by #6146
Closed

AutoComplete: event type in onInput prop is FormEvent<HtmlSpanElement> #6145

datacampsis opened this issue Mar 13, 2024 · 0 comments · Fixed by #6146
Assignees
Labels
Typescript Issue or pull request is *only* related to TypeScript definition
Milestone

Comments

@datacampsis
Copy link
Contributor

Describe the bug

When use onInput prop in AutoComplete componente, typescript reports an error in e.target.value, saying that value does not exist, but if print the console.log(e.target.value), works fine.

Reproducer

https://stackblitz.com/edit/ykfbhx?file=src%2FApp.tsx

PrimeReact version

10.5.1

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. Call the AutoComplete component;
  2. Call onProp callback function
  3. try to use e.target.value in typescript

Expected behavior

Use input-related props and not show errors when calling e.target.value

@datacampsis datacampsis added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 13, 2024
@melloware melloware added Typescript Issue or pull request is *only* related to TypeScript definition and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 13, 2024
melloware added a commit to melloware/primereact that referenced this issue Mar 13, 2024
@melloware melloware self-assigned this Mar 13, 2024
@melloware melloware added this to the 10.5.2 milestone Mar 13, 2024
melloware added a commit to melloware/primereact that referenced this issue Mar 13, 2024
melloware added a commit to melloware/primereact that referenced this issue Mar 13, 2024
melloware added a commit to melloware/primereact that referenced this issue Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Typescript Issue or pull request is *only* related to TypeScript definition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants