Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select component with tag mode inputs wrong value for keydown.enter event #5220

Closed
roro-vetro opened this issue May 7, 2020 · 0 comments · Fixed by #5432
Closed

Select component with tag mode inputs wrong value for keydown.enter event #5220

roro-vetro opened this issue May 7, 2020 · 0 comments · Fixed by #5432

Comments

@roro-vetro
Copy link

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-start?file=package.json

Steps to reproduce

You can even reproduce it in demo of https://ng.ant.design/components/select/en

  1. Choose a select which nzMode is tags
  2. When the select is EMPTY, type a value that is already in the options(like a10, b11)
  3. Press enter.
  4. You can find the value's last character in the select is removed. For example, if you type 'a10' and press enter, it's 'a1' shows up in select instead of 'a10'.
  5. It only happens when select is empty and first input.

What is expected?

What user types, like 'a10' or 'b11'

What is actually happening?

'a1', 'b1'

Environment Info
ng-zorro-antd 9.1.0
Browser chrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants