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: optionValue support #14599

Closed
denny99 opened this issue Jan 22, 2024 · 1 comment · Fixed by #15309
Closed

Autocomplete: optionValue support #14599

denny99 opened this issue Jan 22, 2024 · 1 comment · Fixed by #15309
Labels
Type: New Feature Issue contains a new feature or new component request
Milestone

Comments

@denny99
Copy link
Contributor

denny99 commented Jan 22, 2024

Describe the bug

Well the autocomplete with dataKey is broken, as it is no longer implemented at all.

Autocomplete.ts:

    getOptionValue(option) {
        return option; // TODO: The 'optionValue' properties can be added.
    }

There is another line with a todo that the optionValue should be used (instead of this.dataKey).

Environment

Does not matter

Reproducer

No response

Angular version

Does not matter

PrimeNG version

17.3.3

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

Does not matter

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

Should be properly implemented as stated in the TODO

@denny99 denny99 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 22, 2024
@denny99 denny99 changed the title Component: Title Autocomplete: Option Value is no longer working properly Jan 22, 2024
@sandrotonon
Copy link
Contributor

Still an issue in PrimeNG 17.13.0. The component is actually not usable if the options are objects but the value that needs to be stored is not the object itself but, for example, its ID.

@cetincakiroglu cetincakiroglu added this to the 17.15.0 milestone Apr 26, 2024
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Apr 26, 2024
@cetincakiroglu cetincakiroglu added Type: New Feature Issue contains a new feature or new component request and removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working labels Apr 26, 2024
@cetincakiroglu cetincakiroglu changed the title Autocomplete: Option Value is no longer working properly Autocomplete: optionValue support Apr 26, 2024
nbrown-ScottLogic pushed a commit to nbrown-ScottLogic/primeng that referenced this issue May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants