NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.85k stars 3.9k forks source link

nz-select - Removing tag in the Select Mode tag after pressing enter #8646

Open saeidi-dev opened 1 month ago

saeidi-dev commented 1 month ago

Reproduction link

https://codesandbox.io/s/68vxnx

Steps to reproduce

In the select component, in the tag mode, after adding a new tag by typing and pressing the enter key, and it is added, if we press the enter key again, the item will be deleted, and if we repeat this, the previous items will also be deleted.

What is expected?

When we type a new phrase and press the enter key, the item is added, and now if we press the enter key again after adding the item, the item is deleted.

What is actually happening?

When we type a new phrase that is not in the list and press the enter key, a new item will be added, now if we press the enter key after it is added again, the item will be deleted and this will continue, and if we do this again, the previous items will also be deleted.

Environment Info
ng-zorro-antd 18.0.1
Browser chrome
aminhavasi commented 1 month ago

I have the same problem.

ali-memar commented 1 month ago

useful

mrmemar commented 1 month ago

I have this problem too

mhosseinkhani commented 1 month ago

me too

Zz-ZzzZ commented 1 month ago

When you enter a piece of text and press Enter, the focus is on the input text. If you press Enter the second time, the input text tag will be deleted, and the focus is on the last selected tag. The third time you press Enter will delete the last selected tag

In Ant Design for React/Vue, when you type a piece of text and press Enter, the focus is on the first item in options, which is different from the interaction with Ant Deisgn for Angular