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

Value of ng-select does not get updated correctly when using keyboard inputs to change value #2348

Open
dimmelsw opened this issue Feb 15, 2024 · 2 comments
Assignees

Comments

@dimmelsw
Copy link

Describe the bug
Our project uses the Angular reactive forms approach with the update strategy set to updateOn: 'blur'.
The current value of ng-select needs to be evaluated on blur.
To do this, we access the value via the FormControl bound to ng-select in the template.
When using a mouse to change the value of ng-select, the value of the FormControl gets updated correctly.
When using tab to focus ng-select and afterwards typing letters to change the value, the value of the FormControl does not get updated.

Reproducible example
Stackblitz

To Reproduce

  1. Click above ng-select and focus with tab
  2. Press 'f' to select 'Franklin James'
  3. Press tab to leave ng-select
  4. The selected value below will still be empty

When changing value and leaving ng-select using mouse inputs, the output will show the selected value.

Expected behavior
Interacting with tab should produce the same result as interacting with the mouse.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Edge
  • Version: 121.0.2277.112
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🎆

@github-actions github-actions bot added the stale label Apr 16, 2024
@TobiDimmel
Copy link

Problem still exists in v12.0.7

@github-actions github-actions bot removed the stale label Apr 19, 2024
@pavankjadda pavankjadda self-assigned this Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants