react-tag-input-component icon indicating copy to clipboard operation
react-tag-input-component copied to clipboard

Issue Report: Duplicate Tags Re-Populate on Final Deletion

Open kishanm47 opened this issue 7 months ago • 0 comments

When initializing the tag input with a state that includes duplicate values, removing the last instance of a duplicated tag causes the entire list of initial tags to be repopulated unexpectedly.

e.x const [selected, setSelected] = useState(["papaya", "mango", "papaya"]);

it will display three tags "papaya", "mango", "papaya" now when i try to remove papaya -> it works correctly now present "papaya", "mango", now i remove mango -> it works correctly now present "papaya", now when i try to remove the papaya -> here it will load all the tags back ("papaya", "mango", "papaya" )

kishanm47 avatar Apr 24 '25 13:04 kishanm47