Skip to content

Fix trigger for onSelect when multiple is true and typeahead is false #18098

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SehgalShaileen
Copy link

@SehgalShaileen SehgalShaileen commented Apr 17, 2025

Issue:
When using the p-autocomplete component with multiple: true and typeahead: false, the onSelect event is not triggered when a new item is added manually. [(https://stackblitz.com/edit/github-r87asf7e-ppy2ke4s)]

Issue : #18099

Steps to Reproduce:

  1. Set up p-autocomplete with multiple: true and typeahead: false.
  2. Manually add a value in the input field.
  3. The onSelect event is not triggered.

Expected Behavior:
The onSelect event should be triggered when a new item is added manually.

Actual Behavior:
The onSelect event is not triggered when manually adding a value.

Fix:
The issue was fixed by calling onSelect explicitly in the onEnterKey method when multiple: true and typeahead: false.

Copy link

vercel bot commented Apr 17, 2025

@SehgalShaileen is attempting to deploy a commit to the primetek Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant