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

nb-select doesn't deselect option when resetting ngModel #1260

Closed
1 of 2 tasks
frankie567 opened this issue Feb 22, 2019 · 4 comments
Closed
1 of 2 tasks

nb-select doesn't deselect option when resetting ngModel #1260

frankie567 opened this issue Feb 22, 2019 · 4 comments

Comments

@frankie567
Copy link

Issue type

I'm submitting a ... (check one with "x")

  • bug report
  • feature request

Issue description

Current behavior:

After having selected an option with nb-select, if the binded ngModel is resetted (null or undefined value) by the component, the option is still selected in the nb-select.

Expected behavior:

After having selected an option with nb-select, if the binded ngModel is resetted (null or undefined value) by the component, the option should be unselected in the nb-select.

Steps to reproduce:

  • Define a data model in the component.
  • Bind it to a nb-select in the template.
  • Create a button that resets the data model to null on click.
  • Select an option in nb-select.
  • Click on the button.

Related code:

https://stackblitz.com/edit/github-naqwyy

Other information:

  • npm: 6.4.1
  • node: 10.15.0
  • macOS 10.14.2
  • Chrome 72

Angular, Nebular

  • @angular/core: 7.1.4
  • @angular/forms: 7.1.4
  • @nebular/theme: 3.3.0
@aefox
Copy link
Contributor

aefox commented Feb 28, 2019

Fix provided in #1265 (will require discussion and if approved adding some tests)

@aefox
Copy link
Contributor

aefox commented Mar 7, 2019

Fix provided in #1282

@yggg yggg added this to the 4.0.0 milestone Mar 28, 2019
@yggg
Copy link
Contributor

yggg commented May 27, 2019

Closing as fix (#1282) was merged

@yggg yggg closed this as completed May 27, 2019
@TeodorKolev
Copy link

This is not fixed at version 3.1.0 that we are using...

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.

5 participants