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

Bug: the Slider component does not reflect value changes with ngModel in Angular #1050

Closed
dgonzalezr opened this issue May 15, 2024 · 0 comments · Fixed by #1051
Closed

Bug: the Slider component does not reflect value changes with ngModel in Angular #1050

dgonzalezr opened this issue May 15, 2024 · 0 comments · Fixed by #1051
Assignees
Labels
bug 🐛 Something isn't working

Comments

@dgonzalezr
Copy link
Collaborator

BEEQ package

beeq/angular

BEEQ version

1.3.1

Current Behavior

When changing the value of the Slider component in an Angular project, using ngModel, the model does not get updated properly.

Expected Behavior

Using ngModel in the Slider component should guarantee that the model is updated properly when the value changes.

Steps to Reproduce

  1. Create an Angular project that uses @beeq/core and @beeq/angular.
  2. After setting up the project, add a <bq-slider> to the template:
export class AppComponent {
  ...
  sliderValue = [25, 75];

  ...

  onSliderChange(ev: CustomEvent<{ value: string | number | number[] }>) {
    console.log('onSliderChange', ev.detail.value);
    console.log('Slider value changed!', this.sliderValue);
  }
}
<bq-slider
  type="range"
  debounce-time="250"
  enable-value-indicator
  [(ngModel)]="sliderValue"
  (bqChange)="onSliderChange()"
  ngDefaultControl
></bq-slider>
  1. If we change the slider value, we will see that the model (sliderValue) does not get updated.

Code Reproduction URL

https://codesandbox.io/p/devbox/beeq-with-angular-cs7xxf?file=%2Fsrc%2Fapp%2Fapp.component.html%3A14%2C4

Your Environment

No response

Additional Information

No response

@dgonzalezr dgonzalezr added the bug 🐛 Something isn't working label May 15, 2024
@dgonzalezr dgonzalezr self-assigned this May 15, 2024
@dgonzalezr dgonzalezr moved this to In progress 🛠️ in BEEQ Design System May 15, 2024
@github-project-automation github-project-automation bot moved this from In progress 🛠️ to Done 🎉 in BEEQ Design System May 15, 2024
@dgonzalezr dgonzalezr moved this from Done 🎉 to Released 🚀 in BEEQ Design System May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
Status: Released 🚀
Development

Successfully merging a pull request may close this issue.

1 participant