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

Reflect model value changes with editableSearchTerm enabled #2264

Conversation

idpaterson
Copy link

Fixes #2179 by updating the search term displayed in the input element when the model value changes. Includes a failing test as the first commit to demonstrate the problem and the solution.

When editableSearchTerm is enabled, the input is displayed instead of .ng-value-label. While the latter updated in response to model value updates, the former did not.

As a consequence, changes to the model value while you are typing would be disruptive. I feel like this could be a contentious decision, but I chose to skip the search term update when the dropdown is open because I don't think we have a good distinction available for "is typing."

It would be wonderful if this could be hotfixed for earlier versions; I'm using 10.x which is also the version used in the stackblitz example on #2179.

@github-actions
Copy link

This pull request 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 Sep 27, 2023
@github-actions github-actions bot closed this Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With editableSearchTerm=true, ng-select is not visually cleared when model value is cleared (or updated)
1 participant