primefaces / primefaces/primereact
RemoveTokenIcon is not visible for long name tokens in AutoComplete with multiple option
Nobody has claimed this yet.
- 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
- set the preview width to 300px
- select from the list: "Albania", "Congo, the democratic Republic" and "Denmark"
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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