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: optionDisabled property type mismatch: Documentation vs. Implementation #17232

Open
4 tasks
itismohammadreza opened this issue Dec 27, 2024 · 0 comments
Labels
Component: Documentation Issue or pull request is related to Documentation
Milestone

Comments

@itismohammadreza
Copy link
Contributor

Describe the bug

The documentation for the optionDisabled property indicates that its type can be either a string or a function(similar to the behavior of optionLabel and optionValue)
However, when attempting to pass a function to the optionDisabled property, the following TypeScript error is encountered:

Type ((item: any) => string) is not assignable to type string | undefined

This indicates that the actual type definition does not match the documented behavior, as it only accepts string | undefined and not a function.

image

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/slyyzid1

Environment

windows

Angular version

19.0.0

PrimeNG version

v19

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

Expected behavior

The optionDisabled property should align with the documentation and accept either a string or a function

@itismohammadreza itismohammadreza added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 27, 2024
@mertsincan mertsincan added Component: Documentation Issue or pull request is related to Documentation and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 30, 2024
@mertsincan mertsincan added this to the 19.0.3 milestone Dec 30, 2024
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation Issue or pull request is related to Documentation
Projects
Status: Review
Development

No branches or pull requests

2 participants