Skip to content
This repository was archived by the owner on Jun 28, 2026. It is now read-only.
This repository was archived by the owner on Jun 28, 2026. It is now read-only.

AutoComplete: grouped options are not selected with enter key #12624

Description

@erikhorlings

Describe the bug

When selecting an option in an option group in p-utoComplete using the enter key, the selection is lost upon tabbing out of the field. This only occurs with Enter key and with forceSelection is true.

Environment

Angular 14.2.12, PrimeNg 14.2.2.

Reproducer

No response

Angular version

14.2.12

PrimeNG version

14.2.2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v16.3.0

Browser(s)

No response

Steps to reproduce the behavior

Create a p-autoComplete with forceSelection is true and at least one grouped option. Navigate to that selection by using the arrow buttons and select it with the enter key. Press tab to move focus to another field. The selected value is now cleared.

Expected behavior

I expect the selected value to not be cleared.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugIssue contains a bug related to a specific component. Something about the component is not working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions