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

WIP: Fixed #2242 | AutoComplete - Support optionLabel taking callback #14143

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kyjus25
Copy link
Contributor

@kyjus25 kyjus25 commented Nov 16, 2023

Defect Fixes

Fixes #2242

Summary

The docs described being able to pass a callback for when the user wants the label to be a concatenation of multiple fields in the option object but the component was not actually capable of doing so.

Additionally, the field property is deprecated, so the docs have been updated to use optionLabel instead.

Example

<p-autoComplete [optionLabel]="optionLabel" [suggestions]="filteredCountries" (completeMethod)="filterCountry($event)"  />
...
public optionLabel = (option: Country): string => {
  return `${option.label} is a cool country`;
}

Feature Requests

Due to company policy, we are unable to accept feature request PRs with significant changes as such cases has to be implemented by our team following our own processes.
Smaller scaled feature implementations such as adding a property to a component will be considered for merging.

Copy link

vercel bot commented Nov 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
primeng-ssr-test ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2024 4:28pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Jan 10, 2024 4:28pm

Copy link
Contributor

@cetincakiroglu cetincakiroglu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the effort and support!

@cetincakiroglu
Copy link
Contributor

Could you please resolve the conflicts so we can merge it safely?

@kyjus25 kyjus25 changed the title Fixed #2242 | AutoComplete - Support optionLabel taking callback WIP: Fixed #2242 | AutoComplete - Support optionLabel taking callback Jan 10, 2024
@cetincakiroglu
Copy link
Contributor

Hi @kyjus25,

Could you please update your PR. Some files have been changed. Also if we implementing this one to the autocomplete, we also need to do the same for dropdown, multiselect, cascadeselect, selectButton, listbox.

@cetincakiroglu cetincakiroglu added Status: Pending Review Issue or pull request is being reviewed by Core Team Resolution: Needs Revision The pull request can't be merged. Conflicts need to be corrected or documentation and code updated. labels Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Needs Revision The pull request can't be merged. Conflicts need to be corrected or documentation and code updated. Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Template for selected item in autocomplete (single selection mode)
3 participants