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

How to format the selected item in Autocomplete #7522

Closed
mertsincan opened this issue Dec 23, 2024 · 3 comments · Fixed by #7564
Closed

How to format the selected item in Autocomplete #7522

mertsincan opened this issue Dec 23, 2024 · 3 comments · Fixed by #7564
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@mertsincan
Copy link
Member

Reported By PRO User;

Earlier we used to format the selected item with selectedItemTemplate but with latest release of 10.8.5, selectedItemTemplate is not available and only available in multiple mode but we want to format the selection in non-multiple mode also.
is it possible to have selectedItemTemplate enable again and if not, could you please share us how to format the selection of the item in autocomplete component?

@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Dec 23, 2024
@mertsincan mertsincan added this to the 10.8.6 milestone Dec 23, 2024
@mertsincan mertsincan self-assigned this Dec 23, 2024
@github-actions github-actions bot 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 23, 2024
@melloware melloware removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 30, 2024
@KOliver94
Copy link
Contributor

Hi everyone,

Could someone please help clarify how the commit a662f27 resolves the issue mentioned? I'm having trouble understanding the resolution. Additionally, I'm unsure why the type of template was changed to null | string | Function. This seems to break the pattern used by other templates, and I'm unclear on how to use it now.

Thanks in advance for your help!

@mertsincan @melloware

@melloware
Copy link
Member

I will have to look at this change to understand it. The typescript change does look odd

melloware added a commit to melloware/primereact that referenced this issue Jan 5, 2025
@melloware melloware reopened this Jan 5, 2025
@github-actions github-actions bot 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 5, 2025
@melloware
Copy link
Member

@mertsincan i opened a new PR which fixes Autocomplete selectedItemTemplate to be used in both Single and Multiple mode and improved the documentation letting the users know how to use it for both.

@melloware melloware removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 5, 2025
@melloware melloware self-assigned this Jan 5, 2025
@melloware melloware modified the milestones: 10.9.0, 10.9.2 Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants