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: required property doesn't exist #4858

Closed
iSchoen opened this issue Sep 1, 2023 · 4 comments · Fixed by #4871
Closed

AutoComplete: required property doesn't exist #4858

iSchoen opened this issue Sep 1, 2023 · 4 comments · Fixed by #4871
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add Typescript Issue or pull request is *only* related to TypeScript definition
Milestone

Comments

@iSchoen
Copy link

iSchoen commented Sep 1, 2023

Describe the bug

According to the docs, <AutoComplete /> should accept a required prop. According to TS, however, it does not.

Reproducer

No response

PrimeReact version

9.6.2

React version

18.x

Language

TypeScript

Build / Runtime

Next.js

Browser(s)

No response

Steps to reproduce the behavior

N/A

Expected behavior

<AutoComplete /> accepts a required prop.

@iSchoen iSchoen added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 1, 2023
@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 Sep 2, 2023
@melloware
Copy link
Member

I am not sure it should have a required prop the TS may be correct and the docs wrong...?

@iSchoen
Copy link
Author

iSchoen commented Sep 2, 2023

I think that’s entirely possible and it would just be a matter of aligning the two. However, I’m not sure how you would make the input required in a form without JS then. I mean, you could, but it would likely be a hacky wrapper around the AutoComplete component.

@melloware
Copy link
Member

@iSchoen I want to get this fixed but where in the docs do you see it has a required property? https://primereact.org/autocomplete/#api.AutoComplete.props.id

melloware added a commit to melloware/primereact that referenced this issue Sep 3, 2023
@melloware melloware self-assigned this Sep 3, 2023
@melloware melloware added this to the 10.0.0 milestone Sep 3, 2023
@melloware melloware added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Sep 3, 2023
@melloware
Copy link
Member

OK PR submitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add 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