Fix trigger for onSelect when multiple is true and typeahead is false #18098
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue:
When using the p-autocomplete component with
multiple: true
andtypeahead: false
, theonSelect
event is not triggered when a new item is added manually. [(https://stackblitz.com/edit/github-r87asf7e-ppy2ke4s)]Issue : #18099
Steps to Reproduce:
multiple: true
andtypeahead: false
.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 theonEnterKey
method whenmultiple: true
andtypeahead: false
.