primefaces / primefaces/primereact

RemoveTokenIcon is not visible for long name tokens in AutoComplete with multiple option

Open
#8,515 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Needs Triage
Dominant language
CSS
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

if you select an item from the suggestion list with a long text that exceeds the field width, the X button is not visible and the item cannot be removed.
You have to remove all the following items using backspace and then you can delete it.

https://github.com/user-attachments/assets/c7b1a039-5570-4d15-af28-269d4247585a

Reproducer

https://stackblitz.com/run?file=src%2FApp.jsx

System Information
primereact: 10.9.7
react: 19.1.0
Steps to reproduce the behavior
  1. set the preview width to 300px
  2. select from the list: "Albania", "Congo, the democratic Republic" and "Denmark"
  3. you cannot remove the second option since X button is not visible
Expected behavior

There should be a way to delete the option; maybe the X button could be moved at the beginning or the field should have an horizontal scroll

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the StackBlitz reproducer in src/App.jsx and reproduce the AutoComplete multiple-option case at 300px with the listed country names. Read the AutoComplete component's token and RemoveTokenIcon behavior, then verify that every selected option remains removable when long names overflow the field.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.