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

Remove event emits full ng-select model instead of direct value #2288

Closed
emir7 opened this issue Sep 30, 2023 · 3 comments
Closed

Remove event emits full ng-select model instead of direct value #2288

emir7 opened this issue Sep 30, 2023 · 3 comments
Assignees
Labels

Comments

@emir7
Copy link
Contributor

emir7 commented Sep 30, 2023

Describe the bug
It seems like the remove event emits the whole NgOption object instead of its value property.

To Reproduce

  1. Select an arbitrary item
  2. Deselect previously selected element
  3. Inspect emitted value from (remove) event.

Expected behavior
I would expect that the value emitted from the remove event should contain direct value of the item passed by the user to the items array - the same structure as its counter part add event emits.

@pavankjadda
Copy link
Collaborator

@emir7 this expected behavior. Not all options are strings

@emir7
Copy link
Contributor Author

emir7 commented Oct 20, 2023

@pavankjadda i'm sorry, what exactly do you mean by "not all options are string"? In this particular case full NgOption model is emitted instead of its value

@pavankjadda
Copy link
Collaborator

@pavankjadda i'm sorry, what exactly do you mean by "not all options are string"? In this particular case full NgOption model is emitted instead of its value

My bad. You are right. Will merge the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants